From 37174b64d7d7c3256c876079edaf1bf9e065c9cc Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Fri, 1 Sep 2023 16:22:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 7 ++++++- src/router/index.js | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index be03894..0571228 100644 --- a/src/main.js +++ b/src/main.js @@ -48,7 +48,12 @@ import jquery from "jquery"; Vue.prototype.$ = jquery; //使用钩子函数对路由进行权限跳转 router.beforeEach((to, from, next) => { - document.title = `${to.meta.title} | 视频监控可视化平台`; + if (to.meta.title == "") { + document.title = ` 视频监控可视化平台`; + } else { + document.title = `${to.meta.title} | 视频监控可视化平台`; + } + const role = localStorage.getItem("role"); const token = localStorage.getItem("token"); console.log(role, token); diff --git a/src/router/index.js b/src/router/index.js index 756148b..7b3fa7f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -23,7 +23,7 @@ const routes = [ /* webpackChunkName: "dashboard" */ "../views/stritl/index.vue" ), meta: { - title: "系统首页", + title: "", icon: "el-icon-s-home", }, },