邹方成 2b4b9a2e9c feat: 添加前端项目基础架构和功能模块
refactor: 优化市场价值计算逻辑和行业均值计算

fix: 修复环境变量和配置文件问题

chore: 更新Docker镜像版本至v1.4

docs: 更新需求文档和部署说明

style: 调整代码格式和样式

build: 配置Vite构建工具和依赖管理

test: 添加前端组件测试基础

ci: 设置CI/CD脚本和工作流

perf: 优化前端性能和数据加载
2025-11-06 16:15:26 +08:00

24 lines
633 B
Vue

<template>
<router-view v-slot="{ Component, route }">
<KeepAlive :include="keepAliveRouteNames">
<component
:is="Component"
v-if="appStore.reloadFlag"
:key="appStore.aliveKeys[route.name] || route.fullPath"
/>
</KeepAlive>
</router-view>
</template>
<script setup>
import { useAppStore } from '@/store'
import { useRouter } from 'vue-router'
const appStore = useAppStore()
const router = useRouter()
const allRoutes = router.getRoutes()
const keepAliveRouteNames = computed(() => {
return allRoutes.filter((route) => route.meta?.keepAlive).map((route) => route.name)
})
</script>