Browse Source

搜索结果返回后才显示是否没有结果

reghao 2 năm trước cách đây
mục cha
commit
020e9ee07e
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      src/views/home/Search.vue

+ 3 - 3
src/views/home/Search.vue

@@ -63,7 +63,7 @@ export default {
       length: 0,
       pageSize: 12,
       dataList: [],
-      showEmpty: true
+      showEmpty: false
     }
   },
   created() {
@@ -93,8 +93,8 @@ export default {
             this.length = resData.totalPages
             this.dataList = resData.list
 
-            if (this.total !== 0) {
-              this.showEmpty = false
+            if (this.total === 0) {
+              this.showEmpty = true
             }
           } else {
             console.error(res.msg)