You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import html from "html";
|
|
|
|
import { ElConfigProvider } from "element-plus";
|
|
|
|
import zh from "./lib/element-plus/locale/zh-cn.min.mjs";
|
|
|
|
import en from "./lib/element-plus/locale/en.min.mjs";
|
|
|
|
import { Suspense, reactive, onMounted } from "vue";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: { ElConfigProvider, Suspense },
|
|
|
|
template: html`
|
|
|
|
<el-config-provider :locale="localeMap.get($i18n.locale)">
|
|
|
|
<router-view></router-view>
|
|
|
|
</el-config-provider>
|
|
|
|
`,
|
|
|
|
setup() {
|
|
|
|
const localeMap = reactive(
|
|
|
|
new Map([
|
|
|
|
["zh", zh],
|
|
|
|
["en", en],
|
|
|
|
])
|
|
|
|
);
|
|
|
|
onMounted(() => document.querySelector("#loading.loading").classList.remove("loading"));
|
|
|
|
return {
|
|
|
|
localeMap,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
};
|