Browse Source

fix: 自测修复

wzl 1 month ago
parent
commit
3e39f326cc

+ 1 - 2
packages/core/src/index.js

@@ -4304,7 +4304,6 @@ class ComPDFKitViewer {
         const redactions = Array.isArray(redaction) ? redaction : [redaction]
         const redactions = Array.isArray(redaction) ? redaction : [redaction]
         redactionList = redactions
         redactionList = redactions
       }
       }
-      console.log(redactionList)
       redactionList.forEach(async item => {
       redactionList.forEach(async item => {
         if (item.erasure) {
         if (item.erasure) {
           await this.messageHandler.sendWithPromise('ErasureRedactionFromRect', { pagePtr: item.pagePtr, rect: item.rect })
           await this.messageHandler.sendWithPromise('ErasureRedactionFromRect', { pagePtr: item.pagePtr, rect: item.rect })
@@ -4317,7 +4316,7 @@ class ComPDFKitViewer {
       await this.delAnnotations(this.redactionList)
       await this.delAnnotations(this.redactionList)
       this.redactionList.length = 0
       this.redactionList.length = 0
     }
     }
-    this.pdfViewer.refresh()
+    await this.updateTextPtr()
   }
   }
 }
 }
 
 

+ 1 - 0
packages/webview/src/components/SecurityToolbar/RedactionConfirmDialog.vue

@@ -41,6 +41,7 @@ const confirm = () => {
   useViewer.setActiveToolMode('view')
   useViewer.setActiveToolMode('view')
   useViewer.setShowRedactionApplyBar(false)
   useViewer.setShowRedactionApplyBar(false)
   closeDialog()
   closeDialog()
+  useViewer.closeElement('leftPanel')
 }
 }
 </script>
 </script>