Go to file
sladro f44244fec8 refactor: 使用KeepAlive和动态组件重构页面切换逻辑
## 问题修复
- 修复点击标签按钮出现竖向滚动条的问题
- 修复滚动到底部会显示多个页面内容堆叠的问题
- 修复条件渲染链条被v-show打断导致的逻辑错误

## 主要改动

### 1. MainLayout.vue
- 移除work-content的overflow-y: auto和padding
- 改为overflow: hidden,让各页面组件自己控制滚动

### 2. 创建独立页面组件 (7个新文件)
- WelcomePage.vue - 欢迎首页
- ConnectionPage.vue - CAD连接页面
- SettingsPage.vue - 配置管理页面
- MonitoringPage.vue - 状态监控页面
- ModelViewerPage.vue - 模型查看器页面容器
- AnalysisToolsPage.vue - 分析工具页面容器
- ExportToolsPage.vue - 导出工具页面容器

### 3. DashboardView.vue 重构
- 使用<component :is>动态组件替代大量v-if/v-else
- 使用<KeepAlive :include="['ModelGalleryPage']">缓存模型库状态
- 创建pageComponentMap组件映射表
- 创建currentComponent和currentComponentProps计算属性
- 统一事件传递机制,简化代码结构

### 4. 其他修改
- 修复ModelGalleryPage.vue的ESLint unused variable错误
- 新增ModelTreeNode.vue组件(用于模型结构树显示)

## 技术亮点
- 使用Vue 3 KeepAlive保持模型库页面的3D模型状态
- 动态组件实现清晰的页面切换逻辑
- 组件化设计,每个页面独立管理样式和逻辑
- 符合Vue官方最佳实践

## 效果
-  页面切换无滚动条
-  不会出现多个页面内容堆叠
-  模型库的3D模型状态在切换页面后保持不变
-  代码结构更清晰,易于维护和扩展

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 14:55:47 +08:00
.claude feat: 实现薄壳化分析结果页面完整功能系统 2025-09-17 09:50:02 +08:00
.vscode initial commit 2025-09-15 16:17:05 +08:00
config fix: 修复build后刷新页面空白问题 2025-09-21 11:07:31 +08:00
docs Fix CAD configuration and restore to 6 software 2025-09-16 10:52:20 +08:00
public Add CSS theme system 2025-09-15 17:38:13 +08:00
src refactor: 使用KeepAlive和动态组件重构页面切换逻辑 2025-10-11 14:55:47 +08:00
.editorconfig initial commit 2025-09-15 16:17:05 +08:00
.gitattributes initial commit 2025-09-15 16:17:05 +08:00
.gitignore initial commit 2025-09-15 16:17:05 +08:00
CLAUDE.md feat: 实现几何复杂度分析完整功能 2025-09-18 11:43:31 +08:00
CSS_THEME_GUIDE.md refactor: 全面优化编码规范并修复连接状态检查 2025-09-25 10:30:06 +08:00
index.html Add CSS theme system 2025-09-15 17:38:13 +08:00
jsconfig.json initial commit 2025-09-15 16:17:05 +08:00
package-lock.json feat: 实现Creo连接接口MVP版本,集成统一API封装和通知系统 2025-09-16 15:03:41 +08:00
package.json feat: 实现Creo连接接口MVP版本,集成统一API封装和通知系统 2025-09-16 15:03:41 +08:00

.

This template should help get you started developing with Vue 3 in Vite.

VSCode + Volar (and disable Vetur).

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Compile and Minify for Production

npm run build

Lint with ESLint

npm run lint