This commit is contained in:
张良(004796)
2024-02-19 11:54:36 +08:00
parent 6a65ec1ab2
commit db9b4e845b
4 changed files with 71 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
import {createRouter, createWebHashHistory, RouteRecordRaw} from 'vue-router';
import {useUserStore} from "@/store/modules/user";
import {domainStoreWidthOut} from "@/store/modules/domain";
export const constantRouter: Array<RouteRecordRaw> = [
{
@@ -235,6 +236,7 @@ const router = createRouter({
// @ts-ignore
router.beforeEach((to, from, next) => {
domainStoreWidthOut().refreshDomain();
if (to.meta.title) { // 判断是否有标题
document.title = to.meta.title as string;
}