From 5b1acbdeb787847f990cb4f319fd8c77df6f8d78 Mon Sep 17 00:00:00 2001 From: zikai <1621362626@qq.com> Date: Tue, 28 Jul 2026 10:39:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=99=BD=E6=9D=BF=E9=A1=B5=E7=AD=BE?= =?UTF-8?q?=E4=BB=8E=20iframe=20=E6=94=B9=E4=B8=BA=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=9C=9F=E7=BB=84=E4=BB=B6=E6=8C=82=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增 zWhiteBoard 子模块(textarea + WebSocket 实时同步、心跳、断线重连), Whiteboard.vue 改为组件包装器,经 :locale/:boardId props 透传,与 zPDF_package 范式一致。 复用 zTools2 的 /api/wb/* 与 /api/ws/wb/* 接口,后端无改动;旧版 /api/wb-page/* 保留不删。 清理 iframe 专用配置(pagePath)与降级文案(whiteboard.openExternal)。 --- .gitmodules | 3 + src/config/app.config.js | 4 +- src/i18n/locales/en.js | 1 - src/i18n/locales/zh-CN.js | 1 - src/modules/whiteboard/Whiteboard.vue | 147 +++++--------------------- src/modules/whiteboard/index.js | 7 +- third_party/zWhiteBoard | 1 + 7 files changed, 36 insertions(+), 128 deletions(-) create mode 160000 third_party/zWhiteBoard diff --git a/.gitmodules b/.gitmodules index fad4963..50f3283 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "third_party/zPDF_package"] path = third_party/zPDF_package url = https://git.zikai.wang/zikai/zPDF_package.git +[submodule "third_party/zWhiteBoard"] + path = third_party/zWhiteBoard + url = https://git.zikai.wang/zikai/zWhiteBoard.git diff --git a/src/config/app.config.js b/src/config/app.config.js index 6ab7d7f..c70f0a0 100644 --- a/src/config/app.config.js +++ b/src/config/app.config.js @@ -19,9 +19,7 @@ export const appConfig = { baseUrl: BASE_URL, // 存活探针路径;周期探测,挂掉则隐藏页签并卸载组件 healthPath: '/api/health', - // 记事本页面路径生成器 - pagePath: (boardId) => `/api/wb-page/${encodeURIComponent(boardId)}`, - // 默认打开的记事本 id + // 默认打开的记事本 id(Whiteboard.vue 的 resolveBoardId 回退用) defaultBoardId: 'share', // 探测超时(毫秒) healthTimeoutMs: 4000 diff --git a/src/i18n/locales/en.js b/src/i18n/locales/en.js index 446faae..3cda9c1 100644 --- a/src/i18n/locales/en.js +++ b/src/i18n/locales/en.js @@ -17,7 +17,6 @@ export default { pdf: 'PDF Converter' }, whiteboard: { - openExternal: 'Open in new tab', boardId: 'Board ID', switch: 'Switch' } diff --git a/src/i18n/locales/zh-CN.js b/src/i18n/locales/zh-CN.js index f73359b..a4edb7f 100644 --- a/src/i18n/locales/zh-CN.js +++ b/src/i18n/locales/zh-CN.js @@ -16,7 +16,6 @@ export default { pdf: 'PDF 转换' }, whiteboard: { - openExternal: '在新标签页打开', boardId: '白板 ID', switch: '切换' } diff --git a/src/modules/whiteboard/Whiteboard.vue b/src/modules/whiteboard/Whiteboard.vue index b796abf..ef8c635 100644 --- a/src/modules/whiteboard/Whiteboard.vue +++ b/src/modules/whiteboard/Whiteboard.vue @@ -1,13 +1,22 @@ @@ -104,28 +83,8 @@ function openExternal() { - -
{{ t('common.serviceUnavailable') }}
- -