不打开工具栏不允许操作数据

This commit is contained in:
zhangxuelin 2024-08-08 17:02:18 +08:00
parent e1e9f171e0
commit 964e99c186
1 changed files with 9 additions and 2 deletions

View File

@ -120,6 +120,13 @@ const renderPage = async (canvasobj) => {
}
//
const savaDataStore = () => {
if(!toolState.isToolWin){
toolState.isPdfWin=false
toolState.showBoardAll=true //
ipcRenderer.invoke('tool-sphere:reset') //tool
ipcRenderer.send('open-PDF:minimize')
return
}
imgarr.value.forEach((a) => {
if (a.index == 0) {
a.JSONdata = canvasFabricVue.value.canvas.toJSON()
@ -170,7 +177,8 @@ const initPdf = async (type = 'default') => {
a.JSONdata = canvas1FabricVue.value.canvas.toJSON()
}
})
if (type != 'default') {
// +
if (type != 'default' && toolState.isToolWin) {
const nameMap = new Map(canvsStore.pageArr.map((item) => [item.page, item.id]))
//
let promises = []
@ -274,7 +282,6 @@ const initPdfone = async () => {
}
onMounted(async () => {
try {
console.log(props.pdfObj.pdfUrl)
// canvas
const pdf = await pdfjsLib.getDocument(props.pdfObj.pdfUrl).promise
numPagesTotal.value = pdf.numPages