<template>
	<!-- <RouteCache /> -->
	<router-view></router-view>
	<div id="loading" v-show="loading" v-loading="true"></div>
</template>

<script setup lang="ts">
	import RouteCache from '@/components/RouteCache.vue'
	import { useRouter } from 'vue-router'
	import { computed, provide, nextTick, ref } from 'vue'
	import { useGlobalStore } from '@/stores'
	const router = useRouter()
	const globalStore = useGlobalStore()
	const loading = computed(() => globalStore.state.loading || globalStore.state.view_loading)
	globalStore.setLoading(false)
	window['onClickPrivacy'] = () => {
		// window.event?.preventDefault()
		console.log('onClickPrivacy')
	}
	window['onClickLogin'] = () => {
		router.push({ name: 'login' })
	}
	window['onClickRegister'] = () => {
		router.push({ name: 'register' })
	}
</script>

<style lang="less">
	#app {
		font-size: 1.6rem;
	}
	.el-message {
		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>
