File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ node_modules
55.DS_Store
66.output
77.eslintcache
8+ .idea
Original file line number Diff line number Diff line change @@ -13,12 +13,13 @@ export function useLocale() {
1313 }
1414
1515 locale . value = _locale as string
16+ setLocaleTitle ( )
1617 }
1718
1819 const title = useTitle ( )
1920
20- const setLocaleTitle = ( locale ?: string , isKey : boolean = false ) => {
21- const _t = isKey ? t ( locale || 'app.title' ) : locale
21+ function setLocaleTitle ( locale ?: string , isKey : boolean = false ) {
22+ const _t = isKey ? t ( locale || 'app.title' ) : locale || t ( 'app.title' )
2223 title . value = _t === t ( 'app.title' ) ? _t : `${ _t } - ${ t ( 'app.title' ) } `
2324 }
2425
Original file line number Diff line number Diff line change 55 },
66 "page" : {
77 "index" : {
8- "title" : " Vite + Vue 3 启动模板 "
8+ "title" : " 首页 "
99 },
1010 "about" : {
1111 "title" : " 关于" ,
Original file line number Diff line number Diff line change @@ -330,6 +330,7 @@ declare global {
330330 export type { ContentTypeEnum } from '../src/constants/enums'
331331 import ( '../src/constants/enums' )
332332}
333+
333334// for vue template auto import
334335import { UnwrapRef } from 'vue'
335336declare module 'vue' {
@@ -650,4 +651,4 @@ declare module 'vue' {
650651 readonly watchWithFilter : UnwrapRef < typeof import ( '@vueuse/core' ) [ 'watchWithFilter' ] >
651652 readonly whenever : UnwrapRef < typeof import ( '@vueuse/core' ) [ 'whenever' ] >
652653 }
653- }
654+ }
You can’t perform that action at this time.
0 commit comments