Files
Yi.Admin/Yi.Bbs.Vue3/src/App.vue

30 lines
664 B
Vue
Raw Normal View History

2023-12-27 22:41:57 +08:00
<script setup></script>
2023-12-14 10:15:23 +08:00
<template>
2023-12-27 22:41:57 +08:00
<el-config-provider :locale="locale">
<RouterView />
</el-config-provider>
2023-12-14 10:15:23 +08:00
</template>
<script setup>
import useConfigStore from "@/stores/config";
2023-12-27 22:41:57 +08:00
import { ElConfigProvider } from "element-plus";
import { onMounted } from "vue";
2023-12-14 10:15:23 +08:00
2023-12-27 22:41:57 +08:00
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
const locale = zhCn;
2023-12-14 10:15:23 +08:00
const configStore = useConfigStore();
2023-12-27 22:41:57 +08:00
// 判断是否有loading有的话去掉
const loading = document.getElementById("Loading");
if (loading !== null) {
document.body.removeChild(Loading);
}
2023-12-14 10:15:23 +08:00
2023-12-27 22:41:57 +08:00
//加载全局信息
onMounted(async () => {
await configStore.getConfig();
});
2023-12-14 10:15:23 +08:00
</script>
2023-12-27 22:41:57 +08:00
<style scoped></style>