scorpioyq vor 2 Jahren
Ursprung
Commit
7e1db668cb
1 geänderte Dateien mit 7 neuen und 5 gelöschten Zeilen
  1. 7 5
      src/views/resource/component/search.vue

+ 7 - 5
src/views/resource/component/search.vue

@@ -22,16 +22,16 @@
           />
           <base-button class="ml-20" @click="searchList" />
         </div>
-        <div v-if="resultList && resultList.length === 0">
-          <el-empty v-if="loading === false"></el-empty>
-          <el-skeleton v-else :rows="5" animated />
-        </div>
         <div
-          v-else
+          v-loading="loading"
           class="full-width mt-20 flex flex-align-start flex-col hide-scrollbar"
           style="height: 30vh; overflow-y: auto"
         >
+          <div class="full-width" v-if="resultList && resultList.length === 0">
+            <el-empty></el-empty>
+          </div>
           <div
+            v-else
             class="flex flex-align-center border-bottom full-width"
             v-for="item in resultList"
             :key="item.id"
@@ -134,6 +134,8 @@ export default {
     },
     closeDialog() {
       this.searchForm.keyword = ''
+      this.resultList = []
+      this.total = 0
     }
   }
 }