Files
FiDA_Front/src/App.vue

44 lines
1.0 KiB
Vue
Raw Normal View History

2026-02-02 13:32:33 +08:00
<template>
2026-02-10 17:13:53 +08:00
<!-- <RouteCache /> -->
<router-view ></router-view>
2026-02-02 13:32:33 +08:00
<div id="loading" v-if="loading" v-loading="true"></div>
</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-02 13:32:33 +08:00
import { computed } from 'vue'
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-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;
}
#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>