feat: timeTableFix 改为构建期组件集成 + git submodule
- 弃用 iframe 嵌入:直接 import 子模块 timeTableFix 的 App.vue 为懒加载路由 组件,共享 mainPage 构建/依赖(ical.js)/KeepAlive 缓存,无运行期割裂 - git submodule 接入 third_party/timeTableFix(固定到 a49a725),.gitmodules 使用无凭据 URL;.gitignore 忽略子模块 node_modules - 删旧 iframe 包装组件 Timetable.vue,移除 app.config 中 timeTableFix 配置 - timetable 模块不再 requiresAlive(构建期已打包,无远程依赖) - README 更新:项目结构、submodule clone/升级流程、存活校验描述 - 子模块样式隔离(scoped + ttf- 前缀)已在 timeTableFix 侧完成,无泄漏
This commit is contained in:
@@ -15,28 +15,16 @@ export const appConfig = {
|
||||
defaultBoardId: 'share',
|
||||
// 探测超时(毫秒)
|
||||
healthTimeoutMs: 4000
|
||||
},
|
||||
|
||||
// timeTableFix -- ICS 日程整理器(同源 /ttf/ 反向代理到本地 vite preview)
|
||||
timeTableFix: {
|
||||
// 应用页面(同源相对路径,由 Apache /ttf/ 代理到 8888)
|
||||
pageUrl: '/ttf/',
|
||||
// 存活探针 URL(同源,fetch /ttf/ 返回 2xx 即存活)
|
||||
healthUrl: '/ttf/',
|
||||
// 探测超时(毫秒)
|
||||
healthTimeoutMs: 4000
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 取某服务的存活探针 URL。
|
||||
* whiteboard 用 baseUrl+healthPath 拼接;timeTableFix 直接用 healthUrl。
|
||||
* @param {keyof typeof appConfig} service 配置中的服务名
|
||||
* @returns {string} 完整探针 URL,如 https://f.zikai.wang/health
|
||||
*/
|
||||
export function healthUrl(service) {
|
||||
const cfg = appConfig[service]
|
||||
if (!cfg) return ''
|
||||
if (cfg.healthUrl) return cfg.healthUrl
|
||||
return `${cfg.baseUrl}${cfg.healthPath}`
|
||||
}
|
||||
|
||||
11
src/modules/timetable/index.js
Normal file
11
src/modules/timetable/index.js
Normal file
@@ -0,0 +1,11 @@
|
||||
// 模块元数据 -- 日程整理(timeTableFix)页签
|
||||
// 构建期组件集成:直接 import 子模块 timeTableFix 的 App.vue 作为懒加载路由组件。
|
||||
// timeTableFix 作为 git submodule 位于 third_party/timeTableFix,独立维护、独立仓库。
|
||||
// 升级:cd third_party/timeTableFix && git pull,回 mainPage 根 git add 该子模块并重新 build。
|
||||
export default {
|
||||
id: 'timetable',
|
||||
tabKey: 'tabs.timetable',
|
||||
order: 3,
|
||||
// 懒加载子模块组件 -> 独立 chunk(含 ical.js,仅访问该页签时下载)
|
||||
component: () => import('../../../third_party/timeTableFix/src/App.vue')
|
||||
}
|
||||
Reference in New Issue
Block a user