From d5865d4c8eaa5b5a69a3acea25c159654df126c3 Mon Sep 17 00:00:00 2001 From: osiris Date: Wed, 6 Mar 2024 18:46:58 +0800 Subject: [PATCH] fix: debug --- src/router/index.ts | 4 ++-- src/router/router.ts | 4 ++-- src/utils/standard.ts | 8 ++++++++ 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 src/utils/standard.ts diff --git a/src/router/index.ts b/src/router/index.ts index bb793fa..18296c3 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -19,7 +19,7 @@ const router = createRouter({ router.beforeEach((to, _from, next) => { if (to.meta.title && to.meta.title != '') { let oldTitle = document.title - document.title = to.meta.title + ' - ' + oldTitle + document.title = to.meta.title + '-' + oldTitle } next() }) @@ -31,7 +31,7 @@ router.afterEach((to) => { const detailTitle = title //设置title if (detailTitle) { - document.title = detailTitle + ' - ' + import.meta.env.VITE_APP_TITLE + document.title = detailTitle + '-' + import.meta.env.VITE_APP_TITLE } else { document.title = import.meta.env.VITE_APP_TITLE } diff --git a/src/router/router.ts b/src/router/router.ts index 6963af7..1352725 100644 --- a/src/router/router.ts +++ b/src/router/router.ts @@ -5,8 +5,8 @@ export const constantRoute = [ component: () => import('@/components/Home/Home.vue'), name: 'home', meta: { - keywords: '然部落工具坊,在线工具,开发人员工具,时间戳转换,加密,解密,md5,进制转换,二维码,正则表达式,json格式化,照片处理,字数统计', - description: '然部落工具坊,在线工具大全,开发人员工具,日常生活工具,办公助手,时间戳转换,加密,解密,md5,进制转换,二维码,正则表达式,json格式化,照片处理,字数统计', + keywords: '然部落,在线工具,开发人员工具,时间戳转换,加密,解密,md5,进制转换,二维码,正则表达式,json格式化,照片处理,字数统计', + description: '然部落,在线工具,在线工具大全,开发人员工具,日常生活工具,办公助手,时间戳转换,加密,解密,md5,进制转换,二维码,正则表达式,json格式化,照片处理,字数统计', } }, { diff --git a/src/utils/standard.ts b/src/utils/standard.ts new file mode 100644 index 0000000..6865f63 --- /dev/null +++ b/src/utils/standard.ts @@ -0,0 +1,8 @@ +/** + * sleep + * @param ms + * @returns + */ +export function sleep(ms: number): Promise { + return new Promise((resolve) => setTimeout(resolve, ms)); +} \ No newline at end of file