소스 검색

DiskFile.vue 中根据文件类型显示不同的 icon

reghao 6 달 전
부모
커밋
f480efe2d4
1개의 변경된 파일18개의 추가작업 그리고 7개의 파일을 삭제
  1. 18 7
      src/views/disk/DiskFile.vue

+ 18 - 7
src/views/disk/DiskFile.vue

@@ -41,13 +41,24 @@
           label="文件名"
         >
           <template slot-scope="scope">
-            <a
-              style="text-decoration-line: none"
-              href="javascript:void(0)"
-              @click="onClickFilename(scope.row)"
-            >
-              <span>{{ scope.row.filename }}</span>
-            </a>
+            <span v-if="scope.row.fileType === 1000" class="el-icon-folder">
+              <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
+            </span>
+            <span v-if="scope.row.fileType === 1001" class="el-icon-picture">
+              <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
+            </span>
+            <span v-if="scope.row.fileType === 1002" class="el-icon-film">
+              <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
+            </span>
+            <span v-if="scope.row.fileType === 1003" class="el-icon-headset">
+              <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
+            </span>
+            <span v-if="scope.row.fileType === 1004" class="el-icon-document">
+              <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
+            </span>
+            <span v-if="scope.row.fileType === 1005" class="el-icon-files">
+              <a style="text-decoration-line: none" href="javascript:void(0)" @click="onClickFilename(scope.row)">{{ scope.row.filename }}</a>
+            </span>
           </template>
         </el-table-column>
         <el-table-column