Vue.js

How properly to use bootstrap-vue's panel?

本小妞迷上赌 提交于 2021-02-11 13:34:41
问题 I'm trying to migrate my project from vue-strap to bootstrap-vue. I have trouble to migrate panel. The current vue-strap code: <div class="col-sm-3"> <panel is-open type="info"> <table slot="header"><th>Search:</th></table> <search-form :fieldList="fieldList" :customs-max-num="customsMaxNum" :data-types="dataTypes" /> </panel> </div> The search-form is my component. As I understand, I need to use the collapse of bootstrap-vue (without actually collapsing), as shown in the docs. But it looks

Can not load external script js file wtih spring

喜你入骨 提交于 2021-02-11 13:34:26
问题 Structure is: src -main --resources ---vue.html ---example.js vue.html is: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <!-- <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>--> <script src="./example.js"></script> <script> alert("I'm active"); </script> this is working for the alert : I'm active but 404 for http://localhost:8080/example.js but for, it gives error. SAme error. By the way, the endpoind is that: @GetMapping("/vue")

Quarkus, Heroku and different environments

☆樱花仙子☆ 提交于 2021-02-11 13:26:30
问题 I'm currently developing a simple webapp with seperated frontend (Vue) and backend (quarkus REST API) project. For now, I've setup a MVP, where the frontend is displaying some simple data which is called from the backend. To get a working MVP i need to setup CORS support. However, first i want to explain my setup: Setup I'm starting developing environment of my frontend with npm run serve and of my backend with ./mvnw quarkus:dev . Frontend is running on localhost:8081 and backend running on

Quarkus, Heroku and different environments

醉酒当歌 提交于 2021-02-11 13:25:15
问题 I'm currently developing a simple webapp with seperated frontend (Vue) and backend (quarkus REST API) project. For now, I've setup a MVP, where the frontend is displaying some simple data which is called from the backend. To get a working MVP i need to setup CORS support. However, first i want to explain my setup: Setup I'm starting developing environment of my frontend with npm run serve and of my backend with ./mvnw quarkus:dev . Frontend is running on localhost:8081 and backend running on

Store referenced but not defined

为君一笑 提交于 2021-02-11 13:14:36
问题 Hey I have some bullshit issue with store not being defined. Any advice so I can move on and finish this software build? Store and contents of store appears in Vue Inspector tools. When put inline like below it breaks and renders blank - no DOM content inside App component. App.vue offending excerpt <div v-if="$store.state.showPreloader == true" id="preloaderWrap"> <div id="preloader"></div> </div> Store.js import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const state = { stuff }

Store referenced but not defined

南楼画角 提交于 2021-02-11 13:10:34
问题 Hey I have some bullshit issue with store not being defined. Any advice so I can move on and finish this software build? Store and contents of store appears in Vue Inspector tools. When put inline like below it breaks and renders blank - no DOM content inside App component. App.vue offending excerpt <div v-if="$store.state.showPreloader == true" id="preloaderWrap"> <div id="preloader"></div> </div> Store.js import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const state = { stuff }

How can I get data from a response payload <script>

我只是一个虾纸丫 提交于 2021-02-11 13:02:24
问题 Let's say I have a function that runs fetch() to send an asynchronous GET request that returns a response with the following payload: <script type="text/javascript"> var csrfToken = "ImJmMWIxZjI0ZGRmMTA1ZGVkYWQ5NThlNThlYjM3OTYzYmRhNmRiMDAiU" </script> How can I access the csrfToken variable in Vue? When I access the response body it converts that whole body into a giant string rather than running the JS and making the variable available for use. 来源: https://stackoverflow.com/questions

How to handle apollo client errors crashing page render in Nuxt?

∥☆過路亽.° 提交于 2021-02-11 12:47:33
问题 I'm currently maintaining a production Nuxt.js Vue app that integrates GraphQL Apollo Client that's running into page render errors. For the sake of boosting my chances of getting a response, I built a bare-bones code example that showcases only the problem we are running into. Thanks everybody. Source Code Client, https://github.com/sgarcia-dev/error-apollo-client-nuxt Server, https://github.com/sgarcia-dev/error-apollo-server The Problem The problem, is that every now and then, the GraphQL

highjack minified builded dist folder to change a api backend target

谁说我不能喝 提交于 2021-02-11 12:47:25
问题 Explanation i have a dist build of my Vue-CLI App. inside i am using .env vars to handle my Axios.baseURL for my entire APP. ofc in dev mode i am using a dev Backend and DB, in stage , using a mirror of master Backend and DB, and on master the correct Backend and DB for production. what i want is to build with npm run build to create a stage (testable product) and then if the tests results positiv, move the whole dist folder to my production without changing anything of the dist folder,

How to Display a selected grade with its subject?

心已入冬 提交于 2021-02-11 12:42:35
问题 I want to when a user select a dropdown from the list, a group of subjects available for that grade must be displayed with checkboxes next to them My controller public function create() { $grades = Grade::with('subjects')->orderBy('slug', 'asc')->get(); return view('admin.users.create', compact( 'grades')); } Blade file <div class="form-group"> <select id="grade" name="grade" class="form-control @error('grade') is-invalid @enderror" v-model="selectedSubjects"> <option value="">Choose a Grade.