1、computed中的vuex值在data中不更新
computed: {
...mapGetters([
'intepriv'
])
},
data() {
const query = this.$route.query
return {
isIntepriv: this.intepriv
}
}
复制代码
假设intepriv的初始值为false,此处的isIntepriv永远为false.
computed: {
...mapGetters([
'intepriv'
])
},
data() {
const query = this.$route.query
return {
isIntepriv: this.intepriv
}
}
复制代码
假设intepriv的初始值为false,此处的isIntepriv永远为false.
转载于:https://juejin.im/post/5cd3cdfc6fb9a031f90d6d2f