element-assits 0.0.94 → 0.0.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +16 -12
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2420,21 +2420,25 @@ const Qx = {
|
|
|
2420
2420
|
},
|
|
2421
2421
|
getList() {
|
|
2422
2422
|
if (!this.pageRequest) {
|
|
2423
|
-
let
|
|
2423
|
+
let t = [];
|
|
2424
2424
|
if (this.thePagination.show) {
|
|
2425
|
-
const
|
|
2426
|
-
|
|
2425
|
+
const i = (this.page.current - 1) * this.page.pageSize;
|
|
2426
|
+
t = this.data.slice(i, i + this.page.pageSize);
|
|
2427
2427
|
} else
|
|
2428
|
-
|
|
2429
|
-
return this.tableData =
|
|
2430
|
-
}
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2428
|
+
t = this.data;
|
|
2429
|
+
return this.tableData = t, this.page.total = this.data.length, this.asyncPageCurrent = this.page.current, Promise.resolve();
|
|
2430
|
+
}
|
|
2431
|
+
this.innerLoading = !0, this.errMsg = void 0;
|
|
2432
|
+
const r = this.timestamp = Date.now();
|
|
2433
|
+
return this.pageRequest(this.page, this.theForm.attrs.model).then((t) => {
|
|
2434
|
+
if (r !== this.timestamp)
|
|
2435
|
+
return;
|
|
2436
|
+
const { data: i, total: a, current: o } = t || {};
|
|
2437
|
+
this.tableData = i || [], this.page.total = a || 0, this.asyncPageCurrent = o || this.page.current, le(this.tableData) && !this.tableData.length && this.page.current > 1 && this.handleCurrentChange(this.page.current - 1);
|
|
2438
|
+
}).catch((t) => {
|
|
2439
|
+
r === this.timestamp && (this.errMsg = t && t.message);
|
|
2436
2440
|
}).finally(() => {
|
|
2437
|
-
this.innerLoading = !1;
|
|
2441
|
+
r === this.timestamp && (this.innerLoading = !1);
|
|
2438
2442
|
});
|
|
2439
2443
|
},
|
|
2440
2444
|
hideRefresh() {
|