problem description vue can t get the picture src using v-for related codes Please paste the code text below (do not replace the code with pictures) < template > <div class=imgBox> <div class="imgList"> <div...
topic description I set the value of state through this.$store.dispatch in the index.vue file, and then I get the value that cannot be set through this.$store.state in another component crumb sources of topics and their own ideas related codes i...
I need to get the data before vuex instantiation, and I need to request the background. then copy the data to vuex.state in vuex so that the page can get it directly after vuex instantiation. how does nuxt get data before vuex instantiation? ...
when searching for questions about eventbus and vuex, we often see "eventbus for small projects, vuex for medium and large " is it not recommended to use eventbus and vuex at the same time in VUE? I have used vuex in my project, but not eventbus. No...
official documentation: you cannot directly change the state in store. The only way to change the state in store is to commit the mutation explicitly. But why can I modify the value in state directly? store: state={ testArr:[ {"test&q...
my main.js goes like this: import Vue from vue import Vuex from vuex ; import App from . App import router from . router import store from . store vuexstore.js vuexstore.js Vue.config.productionTip = false ***** Vue.use(Vu...
activate dialog in element-ui in rt,vue component, dialog cannot close app.vue <el-dialog title="" :visible.sync="dialogVisible">< el-dialog> computed: { dialogVisible() { return this.$store.state...
vuex uses module, and then wants to use store.state.a to report type errors in the TS file store index.ts ... Vue.use(Vuex); const store: StoreOptions<RootState> = { modules: { a } }; export default new Vuex.Store<Root...
has the following routes app.vue > a.vue > b.vue a.vue is a full-screen content b.vue is also a full-screen content, and less parts are shared with a, so you can ignore router-view at the bottom of a.vue . when a-> b, the content of an is above th...
I want to assign values to store in the root instance and then get these values in the subcomponent. However, it does not seem to be able to assign a value to store in the root instance. var store = new Vuex.Store ({) state: { paramInfos: [] }, m...
The array is stored in state, and the page needs to be updated in real time as it changes. the official document uses the calculation attribute computed. I usually pass it directly in the parent component and get it with props, so that when the state ch...
A web page gets a large amount of data from the backend and stores it in vuex. Other components get data from vuex, but if there is a delay in the network, if it is unable to get the data, it will report an error. Is there any solution? at present, I ...
The directory structure is as follows: I want to use the data in vuex s state in axios.js I print console.log (store) error undefined if you directly introduce import state from . store state , you can get the data in state, but you can t w...
vue has the following route nesting: > app.vue > a.vue > b.vue app.vue is the ingress, an is a level 2 route, and b is a child of a when accessing the b route, the request written in an and some column hook events will be called repeatedly. What ...
The scenario is like this. I designed an im chat app where vuex is used to manage data between pages. The data structure is like [{id,name,msg []}, {id,name,msg []}]. The data I use in the friend list page is id,name, and then click on a friend to enter ...
there is a background management system routing nesting relationship: app.vue > a.vue > b.vue I want to do this: send a request to verify the validity of token in app.vue send a data request in a b, and the parameters of the data request depend o...
new WebSocket in main.js and then inject it into store action _this.$socket.onopen _this.$socket.onopen console.log( open1 )console.log( open ) to solve puzzles ...
import pano from . module pano export const store = new Vuex.Store({ modules: { pano } }) pano.js const state = { pano: null } at this point, when getting state, it is this.$store.state.pano.pano.xxx. How can I remove a layer of pano? ...
my current scenario is like this. Because the project I m working on is complicated, and the page (component) I m working on is complicated, I use vuex. At present, all the data on that page and the status control of the pop-up window are placed on a m...
there is a http request in a.vue. After the response, this.$store.commit ( userInfo , userInfo); , get the updated data through computed on the b.vue page userInfo(){ return this.$store.state.userInfo }, there is a method in the b.v...