设置页面
This commit is contained in:
11
src/App.vue
11
src/App.vue
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<!-- <RouteCache /> -->
|
||||
<router-view ></router-view>
|
||||
<router-view v-if="show"></router-view>
|
||||
<div id="loading" v-if="loading" v-loading="true"></div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import RouteCache from '@/components/RouteCache.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { computed } from 'vue'
|
||||
import { computed, provide, nextTick, ref } from 'vue'
|
||||
import { useGlobalStore } from '@/stores'
|
||||
const router = useRouter()
|
||||
const globalStore = useGlobalStore()
|
||||
@@ -22,6 +22,13 @@
|
||||
window['onClickRegister'] = () => {
|
||||
router.push({ name: 'register' })
|
||||
}
|
||||
const show = ref(true)
|
||||
provide('reload', () => {
|
||||
show.value = false
|
||||
nextTick(() => {
|
||||
show.value = true
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
|
||||
Reference in New Issue
Block a user