feat: 拆分移动游戏项目为独立 z449 子模块(git submodule + i18n prop 桥接)

- mobile-game 模块源码迁出至独立仓库 z449(third_party/z449),独立可渲染/维护
- z449 App.vue 为便携式组件:自带独立 vue-i18n 实例与 locale 文案
- mainPage 侧 MobileGameWrapper 透传 :locale prop,子模块 watch 同步语言
- mainPage i18n 精简:仅保留 tabs.mobileGame,删除 mobileGame.* 大块文案
- 文档:新增 docs/submodule-z449.md,更新 README/architecture/add-module
This commit is contained in:
Zikai
2026-07-23 07:04:08 +00:00
parent 61e65052d4
commit 6ad6c15e9d
24 changed files with 122 additions and 1193 deletions

View File

@@ -52,8 +52,15 @@ export default {
- `keepInclude` 是模块 id 列表,默认包含所有模块。
- 声明了 `requiresAlive` 的模块,当存活探测为 `down` 时移出名单 -> 组件卸载;恢复 `up` 后重新纳入。
- **匹配约定**KeepAlive 按组件 `name` 匹配,因此每个模块组件需 `defineOptions({ name: <模块 id> })`
- 内置模块(mobile-game/whiteboard/calendar直接在组件内声明。
- 子模块集成timetable由 mainPage 侧包装器 `Timetable.vue` 持有 name子项目自身不持 name保持纯净
- 内置模块whiteboard/calendar直接在组件内声明。
- 子模块集成timetable/mobile-game)由 mainPage 侧包装器持有 name子项目自身不持 name保持纯净
## 子模块集成git submodule + 构建期组件)
部分页签由独立仓库的子项目经 git submodule 集成mainPage 侧用包装器 import 子项目 `App.vue` 作为路由组件(非 iframe共享构建与 KeepAlive 缓存:
- **timeTableFix**`third_party/timeTableFix`,日程整理页签):无 i18n子项目硬编码中文。详见 [submodule-timeTableFix.md](./submodule-timeTableFix.md)。
- **z449**`third_party/z449`,移动游戏页签):子项目自带独立 `vue-i18n` 实例与 locale 文案。mainPage 包装器把当前语言经 `:locale` prop 透传,子项目 `App.vue` `watch` 该 prop 同步到自己的 i18n 实例,从而跟随父项目语言开关响应式切换(不共享 messages仅同步 locale 值)。详见 [submodule-z449.md](./submodule-z449.md)。
## 存活校验requiresAlive