iopProject

This commit is contained in:
zhuzhuxia233
2023-04-12 14:40:19 +08:00
commit 54bc2204dc
133 changed files with 35706 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import { defineStore } from 'pinia'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'
import zhTw from 'element-plus/dist/locale/zh-tw.mjs'
export const ipoStore = defineStore({
id: 'app',
state: () => ({
//1代表英文 2代表繁体中文 3代表简体中文
locale:1
}),
getters: {
localeLang(state) {
return [en,zhTw,zhCn][state.locale-1];
},
},
actions: {
//更改语言的方法
setLocale(data: number) {
this.locale = data
}
}
})