优化bug

This commit is contained in:
zdg 2024-09-02 16:33:25 +08:00
parent d65af70a34
commit 1d808950b5
4 changed files with 11 additions and 16 deletions

View File

@ -383,16 +383,7 @@ defineExpose({
savaDataStore
})
watchEffect(() => {
setTimeout(() => {
console.log(toolState,'监听')
}, 300)
if(toolState.isPdfWin){
// if(toolState.isToolWin){
// ispointer.value=false
// }else{
// ispointer.value=true
// }
watchToolState() //
}
})

View File

@ -104,9 +104,12 @@ const switchPageMode = () => {
}
}
onMounted(async () => {
const isDev = process.env.NODE_ENV == 'development'
toolState.isPdfWin=true //pdf
if (isDev)
pdfObj.pdfUrl = getStaticUrl('aaa.pdf', 'user', 'selfFile', true) //
else
pdfObj.pdfUrl = getStaticUrl(route.query.path, 'user', 'selfFile', true) //线
// pdfObj.pdfUrl = getStaticUrl('aaa.pdf', 'user', 'selfFile', true) //
textbookId.value = route.query.textbookId
pdfObj.bookId=textbookId.value
//

View File

@ -29,7 +29,7 @@ onMounted(async() => {
const handleMode = (newVal, oldVal) => {
if(toolStore.isPdfWin){
if(newVal=='clear'){
emit('update:modelValue', oldVal)
setTimeout(() => emit('update:modelValue', oldVal), 10)
}
return
}
@ -47,7 +47,7 @@ const handleMode = (newVal, oldVal) => {
case 'clear': //
if(oldVal){
FabricVue.history?.clean()
emit('update:modelValue', oldVal)
setTimeout(() => emit('update:modelValue', oldVal), 10)
}
break

View File

@ -51,8 +51,9 @@ import imChat from './components/imChat.vue' // im-chat-子组件
import vDrag from './directive/drag' // -
import vIgnore from './directive/ignore' // -穿
import { useToolState } from '@/store/modules/tool' // -
import { ipcMsgSend, ipcHandle, ipcMain, ipcMsgInvoke } from '@/utils/tool' //
import { ipcMsgSend, ipcMain, sessionStore } from '@/utils/tool' //
import MsgEnum from '@/plugins/imChat/msgEnum' // -(nuem)
const route = useRoute();
const tabActive = ref('select') //
const isFold = ref(false) //
@ -82,7 +83,8 @@ const btnList = [ // 工具栏按钮列表
// === ===
onMounted(async() => {
if (!electron) return //
getClassInfo() // ex3
// console.log(sessionStore)
// getClassInfo() // ex3
setTimeout(() => {
resetStatus() // -
}, 200);
@ -104,7 +106,6 @@ const getClassInfo = async () => {
const tabChange = (val) => {
const bool = !toolStore.isPdfWin && !toolStore.showBoardAll
if(bool) toolStore.showBoardAll = true
// ipcMsgSend('tool-sphere:close')
toolStore.model = val // tab
}
// logo - |