fix: 白板页签乐观显示 + 白板切换输入框 + /whiteboard/{id} 直链

- 存活逻辑改为乐观显示:探测中(pending)/存活(up) 都显示页签,仅明确
  不可达(down) 才隐藏。修复首屏看不到页签、需刷新才出现的问题
- 白板页加 ID 输入框与切换按钮,可切换不同白板,默认 share
- 路由支持 /whiteboard/:boardId 可选参数,直链访问自动填入输入框并切换
- 模块可声明 param 让路由表生成子路径,保持注册表驱动
This commit is contained in:
2026-07-22 02:43:26 +00:00
parent b5dcf924fb
commit 370388e729
7 changed files with 154 additions and 18 deletions

View File

@@ -5,8 +5,11 @@ import modules from '../modules/index.js'
const moduleRoutes = modules
.map((m) => {
try {
// 模块可声明 param如 'boardId')以接受 /<id>/<param> 形式的子路径,
// 形如 /whiteboard/share。可选参数 (? 后缀) 使 /whiteboard 仍可访问。
const paramPart = m.param ? `/:${m.param}?` : ''
return {
path: `/${m.id}`,
path: `/${m.id}${paramPart}`,
name: m.id,
component: m.component,
meta: { moduleId: m.id }