mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-06 00:18:51 +08:00
28 lines
616 B
Vue
28 lines
616 B
Vue
<template>
|
|
<el-config-provider :locale="currentLocale">
|
|
<router-view />
|
|
</el-config-provider>
|
|
</template>
|
|
|
|
<script>
|
|
import { ElConfigProvider } from "element-plus"
|
|
import zhCn from "element-plus/lib/locale/lang/zh-cn"
|
|
import en from "element-plus/lib/locale/lang/en"
|
|
export default {
|
|
components: {
|
|
[ElConfigProvider.name]: ElConfigProvider
|
|
},
|
|
computed: {
|
|
// eslint-disable-next-line vue/return-in-computed-property
|
|
currentLocale() {
|
|
switch (this.$storage.locale?.locale) {
|
|
case "zh":
|
|
return zhCn
|
|
case "en":
|
|
return en
|
|
}
|
|
}
|
|
}
|
|
};
|
|
</script>
|