From 70e99e69ba570f8dfe0fcac58ea57a1271786ff1 Mon Sep 17 00:00:00 2001 From: zdg Date: Wed, 4 Sep 2024 19:50:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/components/pdf/index.vue | 10 +++++++--- src/renderer/src/views/classBegins/index.vue | 1 + src/renderer/src/views/tool/sphere.vue | 11 ++++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/components/pdf/index.vue b/src/renderer/src/components/pdf/index.vue index 64a8671..b2e8aa7 100644 --- a/src/renderer/src/components/pdf/index.vue +++ b/src/renderer/src/components/pdf/index.vue @@ -102,8 +102,10 @@ const renderPage = async (canvasobj) => { // 保存数据 const savaDataStore = (type) => { if(!toolState.isToolWin){ - toolState.isPdfWin=false - toolState.showBoardAll=true //恢复默认值 + toolState.isPdfWin = false + nextTick(() => { + toolState.showBoardAll = true //恢复默认值 + }) if(type=='rest'){ ipcRenderer.invoke('tool-sphere:reset') //重置tool状态 ipcRenderer.send('open-PDF:close') @@ -143,7 +145,9 @@ const savaDataStore = (type) => { }) Promise.all(promises).then(res=>{ toolState.isPdfWin=false - toolState.showBoardAll=true //恢复默认值 + nextTick(() => { + toolState.showBoardAll=true //恢复默认值 + }) // ipcRenderer.send('open-PDF:minimize') if(type=='rest'){ ipcRenderer.invoke('tool-sphere:reset') //重置tool状态 diff --git a/src/renderer/src/views/classBegins/index.vue b/src/renderer/src/views/classBegins/index.vue index afd9920..ccc2af4 100644 --- a/src/renderer/src/views/classBegins/index.vue +++ b/src/renderer/src/views/classBegins/index.vue @@ -105,6 +105,7 @@ const switchPageMode = () => { } onMounted(async () => { const isDev = process.env.NODE_ENV == 'development' + // toolState.showBoardAll = false // 隐藏画板 toolState.isPdfWin=true //设置打开pdf窗口 if (isDev) pdfObj.pdfUrl = getStaticUrl('aaa.pdf', 'user', 'selfFile', true) //本地 diff --git a/src/renderer/src/views/tool/sphere.vue b/src/renderer/src/views/tool/sphere.vue index d5c015b..1418969 100644 --- a/src/renderer/src/views/tool/sphere.vue +++ b/src/renderer/src/views/tool/sphere.vue @@ -83,6 +83,8 @@ const btnList = [ // 工具栏按钮列表 // === 页面加载完毕 === onMounted(async() => { if (!electron) return // 浏览器端 + // window.test = sessionStore + // window.test1 = toolStore getClassInfo() // 获取课堂详情 ex3 resetStatus() // 开启重置状态-监听 }) @@ -104,6 +106,7 @@ const getClassInfo = async () => { const tabChange = (val) => { const bool = !toolStore.isPdfWin && !toolStore.showBoardAll if(bool) toolStore.showBoardAll = true + console.log('tabChange:', val, bool) toolStore.model = val // 存储当前tab } // logo 点击-事件 折叠|展开 @@ -133,7 +136,13 @@ const logoHandle = (e,t) => { const mouseChange = (bool) => { let resBool = false if (tabActive.value == 'select') resBool = !!bool - if (!isShow.value) resBool = !!bool + else { + if (!isShow.value) resBool = !!bool + // pdf强行穿透 + const isPdf = !resBool && toolStore.isPdfWin + if (isPdf) resBool = true + } + // console.log('mouseChange:', bool, resBool) setIgnore(resBool) } // im-chat: 聊天事件 {type, data} -- 2.44.0.windows.1