computed: {
        //需要监听的数据
        loginToken () {
            return this.$store.state.userinfo.status;
        }
    },
    watch: {
        loginToken (status) {//监听的数据,根据不同情况执行不同
            console.log(status)
            if (status){
                this.$router.push({path: '/main/sy'}); //登录成功跳转
            }
        }
    },

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案