美文网首页
vue中底部tab切换,使用本地存储index,返回页面不刷新的

vue中底部tab切换,使用本地存储index,返回页面不刷新的

作者: 北上广_d8bd | 来源:发表于2019-02-11 17:14 被阅读0次

watch: {

    $route(to, from) {

      console.log(to);

      if (to.path == '/main/home') {

        this.actived = 0

      } else if (to.path == '/main/lesson') {

        this.actived = 1

      } else if (to.path == '/main/my') {

        this.actived = 2

      }

    }

  },

相关文章

网友评论

      本文标题:vue中底部tab切换,使用本地存储index,返回页面不刷新的

      本文链接:https://www.haomeiwen.com/subject/sxjygftx.html