mirror of
https://github.com/jekip/naive-ui-admin.git
synced 2026-02-16 19:22:27 +08:00
fix Bug or esLink formatting
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
import MainView from './index.vue'
|
||||
import MainView from './index.vue';
|
||||
|
||||
export { MainView }
|
||||
export { MainView };
|
||||
|
||||
@@ -3,41 +3,40 @@
|
||||
<template #default="{ Component, route }">
|
||||
<transition name="zoom-fade" mode="out-in" appear>
|
||||
<keep-alive v-if="keepAliveComponents" :include="keepAliveComponents">
|
||||
<component :is="Component" :key="route.fullPath"/>
|
||||
<component :is="Component" :key="route.fullPath" />
|
||||
</keep-alive>
|
||||
<component v-else :is="Component" :key="route.fullPath"/>
|
||||
<component v-else :is="Component" :key="route.fullPath" />
|
||||
</transition>
|
||||
</template>
|
||||
</RouterView>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent, computed } from 'vue'
|
||||
import { useAsyncRouteStore } from '@/store/modules/asyncRoute'
|
||||
import { defineComponent, computed } from 'vue';
|
||||
import { useAsyncRouteStore } from '@/store/modules/asyncRoute';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'MainView',
|
||||
components: {},
|
||||
props: {
|
||||
notNeedKey: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
export default defineComponent({
|
||||
name: 'MainView',
|
||||
components: {},
|
||||
props: {
|
||||
notNeedKey: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
animate: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
animate: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
setup() {
|
||||
const asyncRouteStore = useAsyncRouteStore()
|
||||
// 需要缓存的路由组件
|
||||
const keepAliveComponents = computed(() => asyncRouteStore.keepAliveComponents)
|
||||
return {
|
||||
keepAliveComponents
|
||||
}
|
||||
}
|
||||
})
|
||||
setup() {
|
||||
const asyncRouteStore = useAsyncRouteStore();
|
||||
// 需要缓存的路由组件
|
||||
const keepAliveComponents = computed(() => asyncRouteStore.keepAliveComponents);
|
||||
return {
|
||||
keepAliveComponents,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user