panhui 4 anni fa
parent
commit
30ba4f6b6e
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      src/main/nine-space/src/mixins/list.js

+ 6 - 0
src/main/nine-space/src/mixins/list.js

@@ -29,6 +29,9 @@ export default {
 
             if (this.httpType === 'get') {
                 this.$http.get(this.url, data, { body: 'json' }).then(res => {
+                    if (res.first) {
+                        this.list = [];
+                    }
                     this.list = [...this.list, ...res.content];
                     this.empty = res.empty;
                     this.loading = false;
@@ -39,6 +42,9 @@ export default {
                 });
             } else {
                 this.$http.post(this.url, data, { body: 'json' }).then(res => {
+                    if (res.first) {
+                        this.list = [];
+                    }
                     this.list = [...this.list, ...res.content];
                     this.empty = res.empty;
                     this.loading = false;