in a multi-page application, when I close a page and reopen the data cache, some of the values in the form data are added before I close the page, and there are still after reopening....
Route with parameter jump, intercepted by 404 Route Jump Code to: { path: report detail , query: { id: row.deviceId, cid: _t.selectedCompany.companyId ...
The structure of vuex is like this export default new Vuex.Store({ state:{ projects:[], }, getters:{ getAllProjs(state){ return state.projects; }, getProjectNamesById(state){ return st...
when vuex is used in the project to implement the like function, many bug have no idea that there is an information list that clicks a piece of information into the details page and there will be an is_liked to determine whether to like or not. If is_l...
problem description The mutations of vuex uses axios to request data. According to the returned value, you can judge to jump to different pages and report an error . the environmental background of the problems and what methods you have tried this ...
problem description vuex asynchronously requests data in actions, and the obtained data is submitted to mutations, when the component acquires it to data. the environmental background of the problems and what methods you have tried actions this.$ne...
problem description the component in vuex cannot get the status value the environmental background of the problems and what methods you have tried you can t get by using {{$store.state.certificationStatus}} directly in the page. computed: { ...
suppose I have a Vuex store: with such a structure https: jsfiddle.net liqi0816...< a> root people: { name } age: { value } gender: { value } this structure actually has dependencies, age and gender depend on people . If people chan...
Code in main.js store.commit( recruitmentArr , recruitmentArr); Code in mutations.js import * as types from . mutation-types export default { [types.recruitmentArr] (state, val) { state.account = val } } Code in mutation-types....
import Vue from vue import Router from vue-router import HelloWorld from @ components HelloWorld import Login from @ components Login import Account from @ components user Account import Course from @ components user Course impor...
state.js: const state={ article:localStorage["article"]?JSON.parse(localStorage["article"]): [], collections:localStorage["collections"]?JSON.parse(localStorage["collections"]): [], carts:localStorage[&...
it seems that the vuex document does not have a commit global state, and the moutaions parameter only the global state, getter has rootstate,. So how do I commit the global state? ...
my younger brother is not talented. I m learning Vue . I m going to use Douban s API to practice a handwritten single-page application . I encountered a problem with http request . as shown in the figure: I need to use the same movie list data in...
Writing a project needs to accept push data from the background and display it so communicate with socket.io.client now the problem is to modify the state by using store s dispatch or commit method in the socket.io callback. You can see that the prin...
A: :localStorage.setItem( articles , JSON.stringify(articles)) B: computed: { ...mapState([ "articles" ]) }, created(){ var currentId = parseInt(this.$route.query.id); this.currentArticle = this.art...
after the login is successful, save the login information to localStorage. The login registration should be changed to the user name on the home page after login, and the drop-down selection should be included. In the component, I judge which part of th...
The ; menu is not given to me at a time, but only one level at a time. For example, there is a small arrow in personnel management to prove the existence of a submenu. Click the arrow to send a request to get the next level menu of the current menu. If...
Logic generally means that users generate routing tables through user token and generate new routes through addRoute, but get user information through token. Refreshing the page will execute router.beforeEach many times, resulting in multiple visits ...
recently I tried to use vue as a project and used vuex to manage status, but I found a problem: that is, the data in vuex is emptied after the page is refreshed, so basically all the data I store in vuex has to be saved in the browser once, so the quest...
vue project, after refreshing, the data in store is lost. I use localstorage to store it. When I take it out, I find that the page will report an error. I don t know why. Code: login: methods: { ...mapMutations([ SET_USER , ]), ...
the company has built its own private npm warehouse with cnpm, but it has not yet opened its internal account. How to change the default user authentication of cnpm to its own internal user authentication? ...
I m developing a chrome plug-in right now, but I don t know how to debug it! Not the kind of debugging that examines elements, but as usual in the development of web applications, you can see the effect of the page without packaging. the result o...
making a folding panel like this the requirement is that after clicking on the title, the down arrow on the right will be expanded and icon will switch up to the up arrow . The problem with is that every icon I expand will switch up and down toget...
for(var _img in img_file){ formdata.append( file , img_file[_img]); } let files = ctx.request.files; console.log( filesPP+: );console.log(files); for(let index in files){ console.log(index); file[] file = files[ind...
is there any other way to dynamically create objects by reflection ...