Files
xian_vue_new/src/App.vue
T

35 lines
672 B
Vue
Raw Normal View History

2026-04-07 20:01:06 +08:00
<template>
<RouterView></RouterView>
</template>
2026-04-11 10:09:40 +08:00
<script setup lang="ts">
2026-04-07 20:01:06 +08:00
import { RouterView } from 'vue-router'
2026-04-11 10:09:40 +08:00
import { ElLoading } from 'element-plus'
import { watch } from 'vue';
import { useViewerStore } from './stores/useViewerStore';
2026-04-12 22:07:00 +08:00
const loadingOption = {
2026-04-11 10:09:40 +08:00
fullscreen: true,
text: '正在加载配置相关资源中...'
2026-04-12 22:07:00 +08:00
}
let loadingInstanve = ElLoading.service(loadingOption)
2026-04-11 10:09:40 +08:00
watch(() => useViewerStore().getViewerLoadingCompleted(), (val) => {
2026-04-12 22:07:00 +08:00
if (val) {
2026-04-11 10:09:40 +08:00
loadingInstanve.close()
2026-04-12 22:07:00 +08:00
} else {
loadingInstanve = ElLoading.service(loadingOption)
2026-04-11 10:09:40 +08:00
}
})
2026-04-07 20:01:06 +08:00
</script>
<style>
* {
margin: 0;
padding: 0;
font-family: '微软雅黑';
}
</style>