From d6dfe966c07995a02b0f9d3c975e33b7c4492177 Mon Sep 17 00:00:00 2001 From: zhangxuelin <959231531@qq.com> Date: Tue, 17 Dec 2024 10:26:41 +0800 Subject: [PATCH] =?UTF-8?q?pptist=20=E6=AF=94=E4=BE=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/AixPPTist/src/api/watcher.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/AixPPTist/src/api/watcher.ts b/src/renderer/src/AixPPTist/src/api/watcher.ts index f5d91cb..236c0e8 100644 --- a/src/renderer/src/AixPPTist/src/api/watcher.ts +++ b/src/renderer/src/AixPPTist/src/api/watcher.ts @@ -23,7 +23,6 @@ export default () => { const resource = sessionStore.get('curr.resource') // apt 资源 const smarttalk = sessionStore.get('curr.smarttalk') // 备课资源 const execPlay = useExecPlay() // 播放控制 - // 监听幻灯片内容变化 watch(() => slidesStore.slides, (newVal, oldVal) => { PPTApi.updateSlides(newVal, oldVal) // 更新幻灯片内容 @@ -39,7 +38,14 @@ export default () => { watch(() => slidesStore.slideIndex, (newVal, oldVal) => { PPTApi.updateWorkList() }) - + // 监听幻灯片下画布尺寸比例变化 + watch(() => slidesStore.viewportRatio, (newVal, oldVal) => { + const width = slidesStore.viewportSize + const widthandration={width, ratio:newVal} + const data = { id: resource.id, parentContent: JSON.stringify(widthandration)} + PPTApi.updateSlide(data) + }) + // 消息监听ws // console.log('监听器已开启', ChatWs) if (!!ChatWs.ws) { -- 2.44.0.windows.1