yuanyiming hace 2 años
padre
commit
d393328097
Se han modificado 1 ficheros con 11 adiciones y 2 borrados
  1. 11 2
      src/views/firm.vue

+ 11 - 2
src/views/firm.vue

@@ -166,10 +166,18 @@ export default {
       ) {
         this.showFileUrl = url;
         this.showFileType = 1;
-      } else {
+      } else if(
+        url.split(".")[url.split(".").length - 1].toLocaleUpperCase() == ("PNG" || 'JPG')
+      )
+      {
+        this.showFileUrl = url;
+      }
+      else {
+        console.log(url.split(".")[url.split(".").length - 1].toLocaleUpperCase());
+
         this.showFileUrl =
           "https://view.officeapps.live.com/op/view.aspx?src=" + url;
-        this.showFileType = 0;
+          this.showFileType = 0;
       }
       this.showFile = true;
     },
@@ -280,6 +288,7 @@ export default {
   }
 
   .addDialog {
+
     .el-dialog {
       border-radius: 5px;
       overflow: hidden;