diff --git a/public/favicon.ico b/public/favicon.ico
index 0237743..d7bff7f 100644
Binary files a/public/favicon.ico and b/public/favicon.ico differ
diff --git a/public/platform-config.json b/public/platform-config.json
index 9fc2ab8..d31a494 100644
--- a/public/platform-config.json
+++ b/public/platform-config.json
@@ -1,6 +1,7 @@
{
"Version": "5.8.0",
- "Title": "PureAdmin",
+ "Title": "BunnyAdmin",
+ "Copyright": "Copyright © 2020-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 877e323..70e0985 100644
--- a/src/layout/components/lay-footer/index.vue
+++ b/src/layout/components/lay-footer/index.vue
@@ -2,11 +2,12 @@
import { getConfig } from '@/config';
const TITLE = getConfig('Title');
+const Copyright = getConfig('Copyright');
diff --git a/src/layout/components/lay-navbar/index.vue b/src/layout/components/lay-navbar/index.vue
index 8b2761c..a610c9e 100644
--- a/src/layout/components/lay-navbar/index.vue
+++ b/src/layout/components/lay-navbar/index.vue
@@ -13,10 +13,13 @@ import LogoutCircleRLine from '@iconify-icons/ri/logout-circle-r-line';
import Setting from '@iconify-icons/ri/settings-3-line';
import Check from '@iconify-icons/ep/check';
import { $t } from '@/plugins/i18n';
+import { userI18nTypeStore } from '@/store/i18n/i18nType';
const { layout, device, logout, onPanel, pureApp, username, userAvatar, avatarsStyle, toggleSideBar, getDropdownItemStyle, getDropdownItemClass } = useNav();
-const { t, locale, translationCh, translationEn } = useTranslationLang();
+const { locale, translation } = useTranslationLang();
+
+const i18nTypeStore = userI18nTypeStore();
@@ -35,15 +38,17 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
-
-
- 简体中文
-
-
-
+
+
- English
+ {{ item.value }}
@@ -127,12 +132,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
padding: 5px 40px;
}
- .check-zh {
- position: absolute;
- left: 20px;
- }
-
- .check-en {
+ .check {
position: absolute;
left: 20px;
}
diff --git a/src/layout/frame.vue b/src/layout/frame.vue
index 4243b57..cff40d0 100644
--- a/src/layout/frame.vue
+++ b/src/layout/frame.vue
@@ -1,97 +1,90 @@
-
-
-
-
+
+
+
diff --git a/src/layout/hooks/useTranslationLang.ts b/src/layout/hooks/useTranslationLang.ts
index a8ee305..48737cf 100644
--- a/src/layout/hooks/useTranslationLang.ts
+++ b/src/layout/hooks/useTranslationLang.ts
@@ -1,40 +1,29 @@
-import { useNav } from "./useNav";
-import { useI18n } from "vue-i18n";
-import { useRoute } from "vue-router";
-import { onBeforeMount, type Ref, watch } from "vue";
+import { useNav } from './useNav';
+import { useI18n } from 'vue-i18n';
+import { useRoute } from 'vue-router';
+import { onBeforeMount, type Ref, watch } from 'vue';
export function useTranslationLang(ref?: Ref) {
- const { $storage, changeTitle, handleResize } = useNav();
- const { locale } = useI18n();
- const route = useRoute();
+ const { $storage, changeTitle, handleResize } = useNav();
+ const { locale } = useI18n();
+ const route = useRoute();
- function translationCh() {
- $storage.locale = { locale: "zh" };
- locale.value = "zh";
- ref && handleResize(ref.value);
- }
+ function translation(value: string) {
+ $storage.locale = { locale: value };
+ locale.value = value;
+ ref && handleResize(ref.value);
+ }
- function translationEn() {
- $storage.locale = { locale: "en" };
- locale.value = "en";
- ref && handleResize(ref.value);
- }
+ watch(
+ () => locale.value,
+ () => {
+ changeTitle(route.meta);
+ },
+ );
- watch(
- () => locale.value,
- () => {
- changeTitle(route.meta);
- }
- );
+ onBeforeMount(() => {
+ locale.value = $storage.locale?.locale ?? 'zh';
+ });
- onBeforeMount(() => {
- locale.value = $storage.locale?.locale ?? "zh";
- });
-
- return {
- route,
- locale,
- translationCh,
- translationEn
- };
+ return { route, locale, translation };
}
diff --git a/src/layout/index.vue b/src/layout/index.vue
index f3fac76..d8f2eca 100644
--- a/src/layout/index.vue
+++ b/src/layout/index.vue
@@ -1,36 +1,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/layout/redirect.vue b/src/layout/redirect.vue
index 6e16339..5fe20c2 100644
--- a/src/layout/redirect.vue
+++ b/src/layout/redirect.vue
@@ -1,9 +1,9 @@
-
-
+
diff --git a/src/store/i18n/i18nType.ts b/src/store/i18n/i18nType.ts
index b69b7fe..9e5699d 100644
--- a/src/store/i18n/i18nType.ts
+++ b/src/store/i18n/i18nType.ts
@@ -22,7 +22,11 @@ export const userI18nTypeStore = defineStore('i18nTypeStore', {
loading: false,
};
},
- getters: {},
+ getters: {
+ translationTypeList(state) {
+ return state.datalist.map(item => ({ key: item.typeName, value: item.summary }));
+ },
+ },
actions: {
/**
* * 获取多语言类型