From 7fb3599feb542e43f9a34992378fb151f7dddb80 Mon Sep 17 00:00:00 2001 From: scout <1134087124@qq.com> Date: Mon, 13 Jan 2025 11:25:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(types):=20=E6=B7=BB=E5=8A=A0=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=85=83=E6=95=B0=E6=8D=AEsubTitle=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/types/vue-router.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/types/vue-router.d.ts b/app/types/vue-router.d.ts index 4532ae2..9eff852 100644 --- a/app/types/vue-router.d.ts +++ b/app/types/vue-router.d.ts @@ -4,6 +4,8 @@ declare module 'vue-router' { title?: string /** i18n key */ i18n?: string + /** sub title */ + subTitle?: string } } From 36611ab0e9c976798d770540a22c3d101f953730 Mon Sep 17 00:00:00 2001 From: scout <1134087124@qq.com> Date: Mon, 13 Jan 2025 11:25:37 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat(header):=20=E5=AE=9E=E7=8E=B0=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E6=A0=87=E9=A2=98=E5=92=8C=E5=89=AF=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/AppHeader.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/components/AppHeader.vue b/app/components/AppHeader.vue index b3bd597..6bf956b 100644 --- a/app/components/AppHeader.vue +++ b/app/components/AppHeader.vue @@ -14,11 +14,16 @@ function onBack() { const { t } = useI18n() const title = computed(() => { + if (!route.meta) return '' return route.meta.i18n ? t(route.meta.i18n) : (route.meta.title || '') }) - +const subTitle = computed(() => { + if (!route.meta) + return '' + return route.meta.subTitle ? t(route.meta.subTitle) : '' +}) const showLeftArrow = computed(() => route.name && routeWhiteList.includes(route.name)) @@ -31,8 +36,8 @@ const showLeftArrow = computed(() => route.name && routeWhiteList.includes(route > From 2397f86d581bc2b6c3ea4ea93f5125ac5b5576d0 Mon Sep 17 00:00:00 2001 From: scout <1134087124@qq.com> Date: Mon, 13 Jan 2025 11:25:37 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat(i18n):=20=E6=B7=BB=E5=8A=A0=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E8=B5=84=E6=96=99=E9=A1=B5=E9=9D=A2=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n/locales/zh-CN.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/i18n/locales/zh-CN.json b/i18n/locales/zh-CN.json index 2de2169..496a811 100644 --- a/i18n/locales/zh-CN.json +++ b/i18n/locales/zh-CN.json @@ -1,5 +1,5 @@ { - "appSetting":{ + "appSetting": { "appName": "豐和", "appDescription": "泰丰国际京都拍卖会", "appKeyWords": "泰丰,泰丰文化,豐和,京都,拍卖会" @@ -19,6 +19,10 @@ "home": "主页", "profile": "我的" }, + "profile": { + "name": "姓名", + "phone": "手机号" + }, "unocss_page": { "hello": "你好 {0}", "desc": "这是 unocss 一个简单例子。", @@ -44,4 +48,4 @@ "btn_clear": "清空", "btn_empty_desc": "暂无数据" } -} +} \ No newline at end of file