add locale changer

This commit is contained in:
QuangNN
2023-10-31 00:47:29 +07:00
parent 1740d3d281
commit 2376e9bbc8
5 changed files with 33 additions and 0 deletions
+4
View File
@@ -11,6 +11,7 @@ export const useAppStore = defineStore('app', {
/** keepAlive路由的key,重新赋值可重置keepAlive */
aliveKeys: {},
isDark,
locale: 'en'
}
},
actions: {
@@ -45,5 +46,8 @@ export const useAppStore = defineStore('app', {
toggleDark() {
this.isDark = !this.isDark
},
setLocale(locale) {
this.locale = locale
}
},
})