stjdydayou 3 年之前
父节点
当前提交
d32d974d54
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      src/views/statistics/file/index.vue

+ 10 - 1
src/views/statistics/file/index.vue

@@ -34,7 +34,16 @@
     >
       <el-table-column type="selection" width="55" />
       <el-table-column label="ID" prop="id" width="150" />
-      <el-table-column label="文件名" prop="originalFileName" width="300" />
+      <el-table-column label="文件名" prop="originalFileName" width="300">
+        <template slot-scope="scope">
+          <a v-if="scope.row.mimeType.startsWith('image')" :href="scope.row.src" target="_blank">
+            <img :src="scope.row.src" height="50">
+          </a>
+          <a v-else :href="scope.row.src" target="_blank">
+            {{ scope.row.originalFileName }}
+          </a>
+        </template>
+      </el-table-column>
       <el-table-column label="地址" prop="src" min-width="300" />
       <el-table-column label="大小" prop="size" width="150" />
       <el-table-column label="类型" prop="mimeType" width="150" />