fix: 修改细节

This commit is contained in:
MTrun 2021-12-20 16:47:07 +08:00
parent 07eabd8869
commit 4991532883
2 changed files with 10 additions and 3 deletions

View File

@ -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>

View File

@ -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()
})