feat: 添加技能树路由,优化组件缓存和图片预览功能

This commit is contained in:
zhongyidian committed 2025-09-17 23:44:30 +08:00
1 parent 431d3ce6cb
commit f8a997aad4
23 files changed
+751 -18

No files matched your search

+9 -1
View File
@@ -1,13 +1,18 @@
<template>
<div class="app-container" :style="containerStyle">
<div class="app-content" :style="scaleStyle">
<router-view />
<router-view v-slot="{ Component }">
<KeepAlive :include="cachedNames">
<component :is="Component" />
</KeepAlive>
</router-view>
</div>
</div>
</template>
<script setup lang="ts">
import { useScale } from '@/composables/useScale'
import { computed } from 'vue'
// 使用等比例缩放hook
const { scaleStyle } = useScale()
@@ -20,6 +25,9 @@ const containerStyle = {
position: 'relative' as const,
background: '#000'
}
// 只缓存技能树页
const cachedNames = computed(() => ['SkillPage', 'Work'])
</script>
<style>