fix: 修改细节
This commit is contained in:
parent
07eabd8869
commit
4991532883
@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<router-view>
|
||||
<template #default="{ Component, route }">
|
||||
<component :is="Component" :key="route.fullPath" />
|
||||
<component
|
||||
v-if="route.noKeepAlive"
|
||||
:is="Component"
|
||||
:key="route.fullPath"
|
||||
/>
|
||||
<keep-alive v-else>
|
||||
<component :is="Component" :key="route.fullPath" />
|
||||
</keep-alive>
|
||||
</template>
|
||||
</router-view>
|
||||
</template>
|
||||
|
@ -3,12 +3,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { onMounted } from 'vue'
|
||||
import { useLoadingBar } from 'naive-ui'
|
||||
import { MainView } from '@/layout/components/Main/index'
|
||||
|
||||
onMounted(() => {
|
||||
//挂载在 window 方便与在js中使用
|
||||
// 挂载在 window 方便与在js中使用
|
||||
window['$loading'] = useLoadingBar()
|
||||
window['$loading'].finish()
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user