49 lines
1.2 KiB
Markdown
49 lines
1.2 KiB
Markdown
|
|
# Changelog: 文件管理器 P2 — 组件拆分
|
||
|
|
|
||
|
|
**日期**: 2026-06-02
|
||
|
|
**类型**: 重构 (Refactor)
|
||
|
|
**影响范围**: `frontend/src/pages/FilesPage.vue`、`frontend/src/components/files/*`
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 变更摘要
|
||
|
|
|
||
|
|
将文件管理页模板拆分为 6 个子组件;`FilesPage.vue` 仅负责布局装配与 `provideFilesPage` 注入上下文。
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 动机
|
||
|
|
|
||
|
|
P1 已将逻辑迁入 composable,但单文件模板仍超 500 行,不利于维护与 P5/P6 局部优化。
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 新增文件
|
||
|
|
|
||
|
|
- `frontend/src/composables/files/filesPageContext.ts` — provide/inject 上下文
|
||
|
|
- `frontend/src/components/files/FilesToolbar.vue`
|
||
|
|
- `frontend/src/components/files/FilesPermissionAlert.vue`
|
||
|
|
- `frontend/src/components/files/FilesStatusBar.vue`
|
||
|
|
- `frontend/src/components/files/FilesBreadcrumb.vue`
|
||
|
|
- `frontend/src/components/files/FilesList.vue`
|
||
|
|
- `frontend/src/components/files/FilesDialogs.vue`
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 涉及文件
|
||
|
|
|
||
|
|
- `frontend/src/pages/FilesPage.vue` — 由 ~640 行降至 ~45 行
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 是否需迁移 / 重启
|
||
|
|
|
||
|
|
- 仅前端重新构建部署
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 验证方式
|
||
|
|
|
||
|
|
1. `cd frontend && npx vite build`
|
||
|
|
2. 文件管理:工具栏、列表、对话框、编辑器、右键菜单、快捷键
|