Ver Fonte

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

luoxiao há 21 horas atrás
pai
commit
bebcededa6
1 ficheiros alterados com 4 adições e 1 exclusões
  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;