refactor: 清理死代码/提前失败/高内聚低耦合,重写文档
死代码清理: - 删除未使用的 UI 组件 Card.vue / Tag.vue - 移除 app.config.js 死字段 healthTimeoutMs(×2)与 isDev() - 移除 PageShell.vue 死 prop padded(恒为默认值) - 移除 useLocale.js 死导出 isZh/pick/locale - 移除 router/index.js 不可达 try/catch,简化为直接 .map() - 移除 package.json 重复依赖 ical.js(子模块自带) - 移除 i18n 死键 common.notAvailable / common.serviceUnavailable - 移除 vite.config.js 陈旧的 /448 /449 dev proxy(z449 为构建期组件,不走该 URL) 提前失败/日志: - useI18nLazy.js switchLocale 加载语言包失败时 console.error 记录(原静默吞错) - modules/index.js 字段不全的模块跳过时 console.warn 告警(原与文档承诺不符、静默跳过) - deploy.sh 补齐 zWhiteBoard / zPDF_package 的 npm install 与子模块初始化 (均为构建期组件 import,全新检出时缺少依赖会构建失败) 文档对齐现状(无 iframe、无外部域名): - README 改写为简洁版,修正 iframe/ical.js/子模块数量过时描述 - architecture.md 修正 requiresAlive 示例(同源 /api/health,非外部域名) 与「仅白板使用」断言(PDF 也用);移除已删 padded prop - add-module.md 同步移除 padded、修正 requiresAlive 示例 - submodule-timeTableFix.md 修正 ical.js 归属(子模块自带,非父项目共享) - submodule-zPDF_package.md 子项目数量 3 -> 4 - 新增 submodule-zWhiteBoard.md - readme-fixes.md 记录本次勘误
This commit is contained in:
@@ -41,7 +41,6 @@ const { t } = useLocale()
|
||||
PageShell props:
|
||||
- `titleKey`:i18n 键,渲染页面标题;不传则无标题
|
||||
- `fluid`:true 突破 1080px 全宽(如日历页)
|
||||
- `padded`:false 去掉默认上下间距(页面自管布局时用)
|
||||
- `#actions` 具名插槽:标题旁的操作区(如白板切换表单)
|
||||
|
||||
### 3. 加 i18n 文案
|
||||
@@ -80,7 +79,7 @@ export default { id: 'secret', tabKey: 'tabs.secret', order: 99, hidden: true, c
|
||||
import { healthUrl } from '../../config/app.config.js'
|
||||
export default {
|
||||
id: 'my-service', tabKey: 'tabs.myService', order: 5,
|
||||
requiresAlive: 'https://example.com/health', // 存活探针 URL
|
||||
requiresAlive: healthUrl('myService'), // 同源探针 URL(/api/health)
|
||||
component: () => import('./MyService.vue')
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user