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 , ]), ...
Android webview input input box input text is too long, blocked by the input box, how to solve, how to make the previously entered English indented to the left, the back cursor can be seen and displayed. ...
what should I do if I want to display a vue component in each page of tab in iview, and tab is dynamically rendered (in the form of a new tab in a browser window, but in a single-page application)? <div> <Tabs type="card" c...
there is a json 3D object, which was successfully imported when it was imported, and no error was reported, but it had no effect. ask the boss to take a look at it. Thank you very much! The code address of is as follows: https: github.com LengYXin t...
The page cannot request a picture again after loading a picture, but the picture needs to be read out by script. When canvas changes to base64, you still need to set up the picture img.src to request the picture again, so is there any other way that this...
problem description after the recursive display of the tree component, the checked data cannot be obtained normally (same as duplex invalidation) the environmental background of the problems and what methods you have tried want to automatically s...