xqd93
xqd93
  • 发布:2019-11-23 18:17
  • 更新:2019-11-23 18:49
  • 阅读:1119

【报Bug】nvue vuex无法监听

分类:nvue

详细问题描述

nvue 无法监听store中的值,直接绑定到dom上是可以的,但是监听不了,也不能再次计算。h5 vue中没问题
=============================================
找到原因了,打开调试器的时候就不生效,关闭调试器就好了,是个奇葩的bug

computed: {  
    ...mapGetters({  
        isLogin: 'userInfo/isLogin'  
    }),  
    watchIsLogin() {  
        console.log('11111h5、vue中走,app、nvue中不走');  
        this.isLogin && this.doNext()  
        return this.isLogin  
    }  
},  
watch: {  
    isLogin(newVal) {  
        console.log('11111h5、vue中走,app、nvue中不走');  
        newVal && this.doNext()  
    },  
},
2019-11-23 18:17 负责人:无 分享
已邀请:
xqd93

xqd93 (作者)

没有人有这种需求吗?

该问题目前已经被锁定, 无法添加新回复