Explorar el Código

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

reghao hace 2 años
padre
commit
020e9ee07e
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  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)