Files
super_video/src/App.vue
T
zhongyidianandClaude Opus 4.7 6f8252472f feat: 完善模块引导与学习进度体验
统一引导提示的持久化控制,补充学习进度入口与模块资源,避免用户返回页面时重复触发提示。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 09:44:59 +08:00

71 lines
1.7 KiB
Vue

<template>
<div class="app-container" :style="containerStyle">
<div class="app-content overflow-hidden" :style="scaleStyle">
<router-view v-slot="{ Component }">
<KeepAlive :include="['Action', 'Skill']">
<component :is="Component" />
</KeepAlive>
</router-view>
</div>
</div>
</template>
<script setup lang="ts">
import { useScale } from '@/composables/useScale'
import {
useUserStore,
useVlogStore,
useFilmStore,
useInterviewStore,
useBasicElementsStore
} from '@/stores'
import { onMounted } from 'vue'
// 使用等比例缩放hook
const { scaleStyle } = useScale()
const userStore = useUserStore()
const vlogStore = useVlogStore()
const filmStore = useFilmStore()
const interviewStore = useInterviewStore()
const basicElementsStore = useBasicElementsStore()
onMounted(async () => {
const params = new URLSearchParams(window.location.search)
const courseId = params.get('courseid')
const uid = params.get('uid')
if (courseId || uid) {
userStore.setCourseInfo({
courseId: courseId ?? null,
uid: uid ?? null
})
}
await Promise.allSettled([
vlogStore.loadVlogStore(),
filmStore.loadFilmStore(),
interviewStore.loadInterviewStore(),
basicElementsStore.loadBasicElementsStore()
])
})
// 容器样式
const containerStyle = {
width: '100vw',
height: '100vh',
overflow: 'hidden',
position: 'relative' as const,
background: '#000'
}
</script>
<style>
#app {
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell',
'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</style>