Vue通过判断控制页面title

this.$nextTick(() => {
      if (this.orderType == 4) {
        document.title = "购买图文复诊服务";
      }else if(this.orderType == 7){
        document.title = "购买电话复诊服务";
      }else if(this.orderType == 6){
        document.title = "购买在线咨询服务";
      }
});

通过this.$route.meta,监测路由变化修改页面title

https://blog.csdn.net/around_primary/article/details/80683104

posted @ 2020-06-11 10:43  夏小夏吖  阅读(1218)  评论(0编辑  收藏  举报