39 lines
1.0 KiB
Vue
39 lines
1.0 KiB
Vue
<template>
|
|
<el-config-provider :locale="locale" :size="assemblySize" :button="buttonConfig">
|
|
<router-view></router-view>
|
|
</el-config-provider>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
// import { useUserStore } from "@/stores/modules/user";
|
|
// const userStore: any = useUserStore();
|
|
import { reactive, ref, computed } from "vue";
|
|
|
|
import { useTheme } from "@/hooks/useTheme";
|
|
import { ElConfigProvider } from "element-plus";
|
|
|
|
import { useGlobalStore } from "@/stores/modules/global";
|
|
|
|
import zhCn from "element-plus/es/locale/lang/zh-cn";
|
|
|
|
const globalStore = useGlobalStore();
|
|
|
|
// init theme
|
|
const { initTheme } = useTheme();
|
|
initTheme();
|
|
const locale = ref(zhCn);
|
|
|
|
// element assemblySize
|
|
const assemblySize = computed(() => globalStore.assemblySize);
|
|
|
|
// element button config
|
|
const buttonConfig = reactive({ autoInsertSpace: false });
|
|
// watch(
|
|
// () => userStore.languageType,
|
|
// (newVal: any) => {
|
|
// console.log(newVal, "=======newVal=======");
|
|
// window.location.reload();
|
|
// }
|
|
// );
|
|
</script>
|