diff --git a/locales/en.yaml b/locales/en.yaml index 6bd0580..8301463 100644 --- a/locales/en.yaml +++ b/locales/en.yaml @@ -1,3 +1,4 @@ +title: System Title buttons:AccountSettings: Account buttons:LoginOut: LoginOut buttons:Login: Login diff --git a/locales/zh-CN.yaml b/locales/zh-CN.yaml index 02b8947..35bb895 100644 --- a/locales/zh-CN.yaml +++ b/locales/zh-CN.yaml @@ -1,3 +1,4 @@ +title: 系统标题 buttons:AccountSettings: 账户设置 buttons:LoginOut: 退出系统 buttons:Login: 登录 diff --git a/public/platform-config.json b/public/platform-config.json index 4f3860b..c6688e6 100644 --- a/public/platform-config.json +++ b/public/platform-config.json @@ -1,6 +1,6 @@ { "Version": "5.9.0", - "Title": "PureAdmin", + "Period":"2024-present", "FixedHeader": true, "HiddenSideBar": false, "MultiTagsCache": false, diff --git a/src/layout/components/lay-footer/index.vue b/src/layout/components/lay-footer/index.vue index b265daf..cceb2e6 100644 --- a/src/layout/components/lay-footer/index.vue +++ b/src/layout/components/lay-footer/index.vue @@ -1,20 +1,17 @@ diff --git a/src/layout/hooks/useNav.ts b/src/layout/hooks/useNav.ts index acd11f4..720ddd7 100644 --- a/src/layout/hooks/useNav.ts +++ b/src/layout/hooks/useNav.ts @@ -82,18 +82,18 @@ export function useNav() { return pureApp.getDevice; }); - const { $storage, $config } = useGlobal(); + const { $storage } = useGlobal(); const layout = computed(() => { return $storage?.layout?.layout; }); const title = computed(() => { - return $config.Title; + return transformI18n("title"); }); /** 动态title */ function changeTitle(meta: routeMetaType) { - const Title = getConfig().Title; + const Title = transformI18n("title"); if (Title) document.title = `${transformI18n(meta.title)} | ${Title}`; else document.title = transformI18n(meta.title); } diff --git a/src/router/index.ts b/src/router/index.ts index 29551f0..43efc59 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,5 +1,4 @@ import "@/utils/sso"; -import { getConfig } from "@/config"; import NProgress from "@/utils/progress"; import { transformI18n } from "@/plugins/i18n"; import { buildHierarchyTree } from "@/utils/tree"; @@ -119,7 +118,7 @@ router.beforeEach((to: ToRouteType, _from, next) => { if (!externalLink) { to.matched.some(item => { if (!item.meta.title) return ""; - const Title = getConfig().Title; + const Title = transformI18n("title"); if (Title) { document.title = `${transformI18n(item.meta.title)} | ${Title}`; } else document.title = transformI18n(item.meta.title); diff --git a/src/store/modules/settings.ts b/src/store/modules/settings.ts index 22f8ec1..3af9df1 100644 --- a/src/store/modules/settings.ts +++ b/src/store/modules/settings.ts @@ -1,16 +1,16 @@ import { defineStore } from "pinia"; import { type setType, store, getConfig } from "../utils"; - +import { transformI18n } from "@/plugins/i18n"; export const useSettingStore = defineStore({ id: "setting", state: (): setType => ({ - title: getConfig().Title, + title: transformI18n("title"), fixedHeader: getConfig().FixedHeader, hiddenSideBar: getConfig().HiddenSideBar }), getters: { - getTitle(state) { - return state.title; + getTitle() { + return transformI18n("title"); }, getFixedHeader(state) { return state.fixedHeader; diff --git a/types/global.d.ts b/types/global.d.ts index ccdbd76..b5fa429 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -83,7 +83,7 @@ declare global { */ interface PlatformConfigs { Version?: string; - Title?: string; + Period?: string; FixedHeader?: boolean; HiddenSideBar?: boolean; MultiTagsCache?: boolean; @@ -116,7 +116,7 @@ declare global { */ interface StorageConfigs { version?: string; - title?: string; + period?: string; fixedHeader?: boolean; hiddenSideBar?: boolean; multiTagsCache?: boolean;