Files
zMainPage/src/modules/whiteboard/index.js
zikai 5b1acbdeb7 feat: 白板页签从 iframe 改为构建期组件挂载
新增 zWhiteBoard 子模块(textarea + WebSocket 实时同步、心跳、断线重连),
Whiteboard.vue 改为组件包装器,经 :locale/:boardId props 透传,与 zPDF_package 范式一致。
复用 zTools2 的 /api/wb/* 与 /api/ws/wb/* 接口,后端无改动;旧版 /api/wb-page/* 保留不删。
清理 iframe 专用配置(pagePath)与降级文案(whiteboard.openExternal)。
2026-07-28 10:39:24 +08:00

20 lines
1012 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 模块元数据 -- 共享记事本(白板)页签
// 构建期组件集成mainPage 侧包装器 Whiteboard.vue import 子模块 zWhiteBoard 的 App.vue
// 套 PageShell 统一容器与标题。zWhiteBoard 作为 git submodule 独立维护,
// 其 UI/交互经同源 fetch/WS 调用 zTools2 的 /api/wb/* 与 /api/ws/wb/*(前后端分离)。
// requiresAlive 指向存活探针 URL启动时探测zTools2 不可达则隐藏该页签。
// 升级cd third_party/zWhiteBoard && git pull回 mainPage 根 git add 该子模块并重新 build。
import { healthUrl } from '../../config/app.config.js'
export default {
id: 'whiteboard',
tabKey: 'tabs.whiteboard',
order: 2,
// 存活探针 URLuseProjects 启动时探测一次,挂掉则不显示页签
requiresAlive: healthUrl('whiteboard'),
// 接受 /whiteboard/:boardId 子路径,使直链访问能预填白板 id
param: 'boardId',
// 懒加载组件 -> 独立 chunk
component: () => import('./Whiteboard.vue')
}