<template> <div id="app"> <loading showTxt="加載中,請(qǐng)稍后" :isShow="isShow"></loading> <nv-head></nv-head> <router-view></router-view> {{isShow}} </div></template><script> import nvHead from './components/header.vue'; import loading from './components/loading.vue'; export default { name : 'app', data () { return { isShow: this.$store.getters.loadingState } }, components: { nvHead, loading }, handleSelect(key, keyPath) { console.log(key, keyPath); } }</script>此時(shí)我其他頁(yè)面修改了this.$store.getters.loadingState 這個(gè)參數(shù),但是這里沒(méi)有雙向綁定,請(qǐng)問(wèn)怎么辦
vue,vuex同步數(shù)據(jù)問(wèn)題
郎朗坤
2018-10-12 14:15:22