2025-03-14 17:52:05 +08:00
|
|
|
<!--
|
|
|
|
* @Description:
|
|
|
|
* @Author: zenghua.wang
|
|
|
|
* @Date: 2024-01-24 18:54:01
|
|
|
|
* @LastEditors: zenghua.wang
|
|
|
|
* @LastEditTime: 2025-02-28 11:31:12
|
|
|
|
-->
|
|
|
|
<template>
|
|
|
|
<el-config-provider :size="size" :locale="zhCn">
|
|
|
|
<router-view />
|
2025-03-17 17:34:32 +08:00
|
|
|
<currentTime ref="apptime"></currentTime>
|
2025-03-14 17:52:05 +08:00
|
|
|
</el-config-provider>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup name="app">
|
2025-03-17 17:34:32 +08:00
|
|
|
import { computed, ref, onMounted, onUnmounted } from 'vue';
|
2025-03-14 17:52:05 +08:00
|
|
|
import { useSettingStore } from '@/store/modules/setting';
|
|
|
|
// 配置element中文
|
|
|
|
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
2025-03-17 17:34:32 +08:00
|
|
|
import currentTime from '@/components/currentTime.vue';
|
2025-03-14 17:52:05 +08:00
|
|
|
|
|
|
|
const SettingStore = useSettingStore();
|
|
|
|
// 配置全局组件大小
|
|
|
|
const size = computed(() => SettingStore.themeConfig.globalComSize);
|
2025-03-17 17:34:32 +08:00
|
|
|
|
|
|
|
let apptime = ref(null);
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
apptime.value && apptime.value.startTime();
|
|
|
|
});
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
apptime.value && apptime.value.chearTime();
|
|
|
|
});
|
2025-03-14 17:52:05 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import './styles/style';
|
|
|
|
</style>
|