@ -21,7 +21,7 @@ export default {
<el-main>
<router-view v-if="!isRefreshing" v-slot="{ Component, route }">
<component :is="Component" v-if="route.meta?.disableCaching" :key="$route.fullPath" />
<keep-alive>
<keep-alive :include="appStore.routes.map(o=>o.path)">
<component :is="Component" v-if="!route.meta?.disableCaching" :key="route.fullPath" />
</keep-alive>
</router-view>
@ -117,7 +117,11 @@ const refreshRouter = async () => {
}
if (o.component.constructor === String) {
const name = o.component;
o.component = () => import(`../views${name}.js`);
o.component = async () => {
const module = await import(`../views${name}.js`);
module.default.name = name;
return module.default;
};
// children