Files
FiDA_Front/src/App.vue

48 lines
1.1 KiB
Vue
Raw Normal View History

2026-02-02 13:32:33 +08:00
<template>
2026-02-10 17:13:53 +08:00
<!-- <RouteCache /> -->
2026-02-23 16:28:39 +08:00
<router-view></router-view>
2026-03-30 16:18:20 +08:00
<div id="loading" v-show="loading" v-loading="true"></div>
2026-02-02 13:32:33 +08:00
</template>
<script setup lang="ts">
import RouteCache from '@/components/RouteCache.vue'
2026-02-04 17:00:58 +08:00
import { useRouter } from 'vue-router'
2026-02-23 14:45:35 +08:00
import { computed, provide, nextTick, ref } from 'vue'
2026-02-02 13:32:33 +08:00
import { useGlobalStore } from '@/stores'
2026-02-04 17:00:58 +08:00
const router = useRouter()
2026-02-02 13:32:33 +08:00
const globalStore = useGlobalStore()
2026-02-04 11:27:45 +08:00
const loading = computed(() => globalStore.state.loading || globalStore.state.view_loading)
2026-02-24 14:54:41 +08:00
globalStore.setLoading(false)
2026-02-04 17:00:58 +08:00
window['onClickPrivacy'] = () => {
// window.event?.preventDefault()
console.log('onClickPrivacy')
}
window['onClickLogin'] = () => {
router.push({ name: 'login' })
}
window['onClickRegister'] = () => {
router.push({ name: 'register' })
}
2026-02-02 13:32:33 +08:00
</script>
<style lang="less">
#app {
font-size: 1.6rem;
}
2026-02-24 14:54:41 +08:00
.el-message {
2026-02-23 16:28:39 +08:00
font-size: 1.6rem;
}
2026-02-02 13:32:33 +08:00
#loading {
position: fixed;
z-index: 999999999;
top: 0;
left: 0;
width: 100%;
height: 100%;
// background-color: rgba(0, 0, 0, 0.3);
// display: flex;
// align-items: center;
// justify-content: center;
}
</style>