Browse Source

add: 上传文档新增密码选项

liutian 7 months ago
parent
commit
a3178eb9f2

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

@@ -501,6 +501,8 @@ class ComPDFKitViewer {
     } else if (file.url && file.originalUrl) {
       parameters.url = file.url;
     }
+    parameters.password = options.password || ''
+    this.#pwd = parameters.password
     // 获取pdf信息,返回promise
     const loadingTask = getDocument(parameters)
     this.pdfLoadingTask = loadingTask

File diff suppressed because it is too large
+ 26 - 9
packages/webview/src/components/DocumentContainer/DocumentContainer.vue