Ver Fonte

fix user avatar

scorpio há 2 anos atrás
pai
commit
913107ebf5
1 ficheiros alterados com 35 adições e 16 exclusões
  1. 35 16
      src/views/resource/component/preview.vue

+ 35 - 16
src/views/resource/component/preview.vue

@@ -45,6 +45,7 @@
             type="primary"
             @click="moreDetail"
             v-if="liButton"
+            icon="Folder"
             >文件历史
           </el-button>
           <el-drawer v-model="liShow" :size="600">
@@ -55,21 +56,16 @@
                 提交历史
               </h3>
             </template>
-            <div class="ml-20">
-              <el-icon class="mr-5" color="#5acafa"> <WarningFilled /> </el-icon
-              >点击对应记录,可以查看历史文件
+            <div class="ml-10 tips flex flex-align-center">
+              <el-icon class="mr-5" color="#5acafa" :size="20">
+                <WarningFilled />
+              </el-icon>
+              点击对应记录,可以查看历史文件
             </div>
-            <a
-              style="
-                background: #e5e3e3;
-                margin-top: 5px;
-                margin-bottom: 5px;
-                margin-right: 20px;
-                padding-bottom: 10px;
-                padding-left: 5px;
-              "
-              class="flex ml-20"
+            <div
+              class="flex ml-20 item"
               v-for="item in fileHistoryList"
+              :key="item.id"
               @click="newDetail(item)"
             >
               <div class="mt-10">
@@ -77,7 +73,7 @@
               </div>
               <div class="ml-20 mt-10">在{{ item.createTime }}上传,</div>
               <div class="ml-20 mt-10">编码:{{ item.fileVO.md5 }}</div>
-            </a>
+            </div>
           </el-drawer>
         </div>
       </div>
@@ -156,7 +152,7 @@ export default {
       this.detail()
     },
     detail() {
-      //先判断是否存在历史列表
+      // 先判断是否存在历史列表
       this.$api.project
         .fileHistory({ fileId: this.fileId, current: 1, size: 100 })
         .then(res => {
@@ -192,7 +188,7 @@ export default {
       }
     },
     moreDetail() {
-      //显示侧边
+      // 显示侧边
       this.liShow = true
     },
     openByFile() {
@@ -231,6 +227,29 @@ export default {
   border: #e6e8ed solid 1px;
 }
 
+.tips {
+  width: 580px;
+  padding: 5px 5px;
+  border-radius: 4px;
+  background-color: #e2eaf5;
+}
+
+.item {
+  background: #f7f8fa;
+  border-radius: 4px;
+  margin: 20px 10px;
+  padding-bottom: 10px;
+  padding-left: 5px;
+}
+
+.item:hover {
+  background: #e6e8ed;
+  border-radius: 4px;
+  margin: 20px 10px;
+  padding-bottom: 10px;
+  padding-left: 5px;
+}
+
 :deep(.el-drawer__body) {
   padding: 0;
 }