private get path() {
return newMenuModule.path;
}
@Watch('path')
getPath(newVal: string, oldVal: string) {
if (newVal !== oldVal) {
this.getVuexState();
}
}
先从 Vuex 中获取到本页面作为计算属性,然后监听计算属性
private get path() {
return newMenuModule.path;
}
@Watch('path')
getPath(newVal: string, oldVal: string) {
if (newVal !== oldVal) {
this.getVuexState();
}
}
先从 Vuex 中获取到本页面作为计算属性,然后监听计算属性