Jelajahi Sumber

fix:修复产品文档预览问题

luoxiao 22 jam lalu
induk
melakukan
bebcededa6
1 mengubah file dengan 4 tambahan dan 1 penghapusan
  1. 4 1
      src/views/base/document/index.vue

+ 4 - 1
src/views/base/document/index.vue

@@ -88,7 +88,10 @@ const testFiles = () => {
   form.value.filePath = pdfUrlList.value[0];
 };
 const PDFDrawerViewRef = ref(null);
-const toShowPDF = (row) => {};
+const toShowPDF = (row) => {
+  let url = import.meta.env.VITE_APP_UPLOAD_URL + row.filePath;
+  PDFDrawerViewRef.value && PDFDrawerViewRef.value.showPdf(url);
+};
 const filePath = import.meta.env.VITE_APP_UPLOAD_URL;
 const test = () => {
   isShowTable.value = true;