hookehuyr

fix: 更新PDF查看器版本并禁用下载功能

更新@sunsetglow/vue-pdf-viewer至0.3.67版本以修复潜在问题
禁用PDF预览组件的下载功能并移除相关UI按钮
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
25 "@fortawesome/free-solid-svg-icons": "^6.5.1", 25 "@fortawesome/free-solid-svg-icons": "^6.5.1",
26 "@fortawesome/vue-fontawesome": "^3.0.5", 26 "@fortawesome/vue-fontawesome": "^3.0.5",
27 "@heroicons/vue": "^2.2.0", 27 "@heroicons/vue": "^2.2.0",
28 - "@sunsetglow/vue-pdf-viewer": "^0.3.1", 28 + "@sunsetglow/vue-pdf-viewer": "^0.3.67",
29 "@vant/touch-emulator": "^1.4.0", 29 "@vant/touch-emulator": "^1.4.0",
30 "@vant/use": "^1.6.0", 30 "@vant/use": "^1.6.0",
31 "@videojs-player/vue": "^1.0.0", 31 "@videojs-player/vue": "^1.0.0",
......
...@@ -69,7 +69,7 @@ const initPdfViewer = () => { ...@@ -69,7 +69,7 @@ const initPdfViewer = () => {
69 navigationShow: false, 69 navigationShow: false,
70 pdfViewResize: true, 70 pdfViewResize: true,
71 toolShow: true, 71 toolShow: true,
72 - download: true, 72 + download: false,
73 clearScale: 1.5, 73 clearScale: 1.5,
74 fileName: props.title, 74 fileName: props.title,
75 lang: "en", 75 lang: "en",
......
...@@ -538,14 +538,14 @@ ...@@ -538,14 +538,14 @@
538 <span>{{ getFileType(file.title || file.name) }}</span> 538 <span>{{ getFileType(file.title || file.name) }}</span>
539 </div> 539 </div>
540 <!-- 复制地址按钮 --> 540 <!-- 复制地址按钮 -->
541 - <button 541 + <!-- <button
542 @click="copyFileUrl(file.url)" 542 @click="copyFileUrl(file.url)"
543 class="flex items-center gap-1 px-2 py-1 text-xs text-gray-500 hover:text-gray-700 hover:bg-gray-50 rounded transition-colors" 543 class="flex items-center gap-1 px-2 py-1 text-xs text-gray-500 hover:text-gray-700 hover:bg-gray-50 rounded transition-colors"
544 title="复制文件地址" 544 title="复制文件地址"
545 > 545 >
546 <van-icon name="link" size="12" /> 546 <van-icon name="link" size="12" />
547 <span>复制地址</span> 547 <span>复制地址</span>
548 - </button> 548 + </button> -->
549 </div> 549 </div>
550 </div> 550 </div>
551 </div> 551 </div>
...@@ -564,13 +564,13 @@ ...@@ -564,13 +564,13 @@
564 在线查看 564 在线查看
565 </button> 565 </button>
566 <!-- 所有文件都显示下载按钮 --> 566 <!-- 所有文件都显示下载按钮 -->
567 - <button 567 + <!-- <button
568 @click="downloadFile(file)" 568 @click="downloadFile(file)"
569 class="btn-secondary flex-1 py-2.5 text-sm font-medium flex items-center justify-center gap-2" 569 class="btn-secondary flex-1 py-2.5 text-sm font-medium flex items-center justify-center gap-2"
570 > 570 >
571 <van-icon name="down" size="16" /> 571 <van-icon name="down" size="16" />
572 下载文件 572 下载文件
573 - </button> 573 + </button> -->
574 </template> 574 </template>
575 575
576 <!-- 移动端:根据文件类型显示不同的预览按钮 --> 576 <!-- 移动端:根据文件类型显示不同的预览按钮 -->
...@@ -621,13 +621,13 @@ ...@@ -621,13 +621,13 @@
621 图片预览 621 图片预览
622 </button> 622 </button>
623 <!-- 其他文件显示下载按钮 --> 623 <!-- 其他文件显示下载按钮 -->
624 - <button 624 + <!-- <button
625 @click="downloadFile(file)" 625 @click="downloadFile(file)"
626 class="btn-secondary flex-1 py-2.5 text-sm font-medium flex items-center justify-center gap-2" 626 class="btn-secondary flex-1 py-2.5 text-sm font-medium flex items-center justify-center gap-2"
627 > 627 >
628 <van-icon name="down" size="16" /> 628 <van-icon name="down" size="16" />
629 下载文件 629 下载文件
630 - </button> 630 + </button> -->
631 </template> 631 </template>
632 </div> 632 </div>
633 </FrostedGlass> 633 </FrostedGlass>
......
...@@ -618,10 +618,10 @@ ...@@ -618,10 +618,10 @@
618 core-js "^3.15.1" 618 core-js "^3.15.1"
619 nanopop "^2.1.0" 619 nanopop "^2.1.0"
620 620
621 -"@sunsetglow/vue-pdf-viewer@^0.3.1": 621 +"@sunsetglow/vue-pdf-viewer@^0.3.67":
622 - version "0.3.1" 622 + version "0.3.67"
623 - resolved "https://registry.yarnpkg.com/@sunsetglow/vue-pdf-viewer/-/vue-pdf-viewer-0.3.1.tgz#b8cf6be450ae6ecdeb6b0abefc4ba971d094285b" 623 + resolved "https://registry.npmjs.org/@sunsetglow/vue-pdf-viewer/-/vue-pdf-viewer-0.3.67.tgz#a0a8357b37c85d3a254eec364e6f971c0fb70dce"
624 - integrity sha512-bgUAaERQx/wGbBqny4LL9Ky3qsHIB2QfOsQKXE73ky+jqKJJk31VAZhzW5JfkJT4oNUJGHpeNw651Osi3AtDHw== 624 + integrity sha512-aODFY5ocm3yNwmb8nrZ+XrRNZCmrmHWajFax+BVljvN2nIRVQGpcWdLwj5Q4ElFC9G88WaMMEfDs71+EeCk+IQ==
625 dependencies: 625 dependencies:
626 "@ant-design/icons-vue" "^7.0.1" 626 "@ant-design/icons-vue" "^7.0.1"
627 "@types/node" "^20.14.9" 627 "@types/node" "^20.14.9"
......