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 , ]), ...
wrote a tab to switch between two div,. Each div has one modal. first tab modal tab tabconsolemodal modal Code <button type="button" class="btn btn-primary" data-toggle="modal" data-target="-sharpexampleModal...
problem description the pie chart has been drawn. To add a click event to the pie chart, you need to get the index, assigned to the this.index, but the print is still empty. It seems that in the click event, there is no way to read this.areaEnergy, ...
problem description echarts.js scale tag to achieve rich text to achieve the effect of Chinese + pictures, solve: echartsdemodemo +: but if you want to achieve the effect of picture + Chinese, which in this case is picture + Monday, how to chan...
formajax sendcodephone_numNoneurl ...
for example: [{date: , time: [{start: , end: },.]},.]; for an array like this, I should judge that date, time.start, time.end is not empty and that it is an empty pop-up window prompt. What I m doing now is to traverse with two for loops, but ...