<!--
 * @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 />
    <currentTime ref="apptime"></currentTime>
  </el-config-provider>
</template>

<script setup name="app">
import { computed, ref, onMounted, onUnmounted } from 'vue';
import { useSettingStore } from '@/store/modules/setting';
// 配置element中文
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import currentTime from '@/components/currentTime.vue';

import { createApp } from 'vue';
import App from './App.vue';
import VueCesium from 'vue-cesium';
import 'vue-cesium/dist/index.css';

const SettingStore = useSettingStore();
// 配置全局组件大小
const size = computed(() => SettingStore.themeConfig.globalComSize);

let apptime = ref(null);

// onMounted(() => {
//   apptime.value && apptime.value.startTime();
// });

// onUnmounted(() => {
//   apptime.value && apptime.value.chearTime();
// });

// const app = createApp(App);
// app.use(VueCesium, {
//   cesiumPath: 'https://unpkg.com/cesium@1.104.0/Build/Cesium/Cesium.js',
//   accessToken:
//     'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiMDhmOWQzMi1mMTQwLTQ5YzktOTZjZS1lZjVlNTQzZjY4OTAiLCJpZCI6MjI1MTM2LCJpYXQiOjE3MTk1NTMxNTl9.3tRI3yX0jZxdsdx0Gvv40FWMnVpLu8CnQ8qedEDTeqs',
// });
// app.mount('#app');
</script>

<style lang="scss">
@import './styles/style';
</style>
