zzz-pc-view 0.0.130 → 0.0.131
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/package.json +1 -1
- package/src/index.es.js +4 -4
- package/src/index.umd.js +1 -1
package/package.json
CHANGED
package/src/index.es.js
CHANGED
|
@@ -5108,7 +5108,7 @@ class CurdApi {
|
|
|
5108
5108
|
}),
|
|
5109
5109
|
// 处理响应数据
|
|
5110
5110
|
(response2) => {
|
|
5111
|
-
response2 = this.Target.bindList(response2);
|
|
5111
|
+
response2 = this.Target.bindList(response2 ?? []);
|
|
5112
5112
|
const { treeKey } = this;
|
|
5113
5113
|
if (treeKey) {
|
|
5114
5114
|
response2 = createBySelf(
|
|
@@ -5946,7 +5946,7 @@ class CurdHandler extends FilterHandler {
|
|
|
5946
5946
|
* @param {number} total - 列表数据的总数。
|
|
5947
5947
|
*/
|
|
5948
5948
|
setList(list2, total) {
|
|
5949
|
-
this.listRef.value = list2;
|
|
5949
|
+
this.listRef.value = list2.length > 0 && list2[0] instanceof this.CurdTarget ? this.CurdTarget.bindList(list2) : list2;
|
|
5950
5950
|
this.totalRef.value = total;
|
|
5951
5951
|
}
|
|
5952
5952
|
/**
|
|
@@ -5969,10 +5969,10 @@ class CurdHandler extends FilterHandler {
|
|
|
5969
5969
|
const data = await this.listRequestUtil.requestData(
|
|
5970
5970
|
api2.getListByPage(this.pagination, query)
|
|
5971
5971
|
);
|
|
5972
|
-
this.setList(
|
|
5972
|
+
this.setList(data.list || [], data.total);
|
|
5973
5973
|
} else {
|
|
5974
5974
|
const data = await this.listRequestUtil.requestData(api2.getList(query));
|
|
5975
|
-
this.setList(
|
|
5975
|
+
this.setList(data || [], (data == null ? void 0 : data.length) ?? 0);
|
|
5976
5976
|
}
|
|
5977
5977
|
} catch (e) {
|
|
5978
5978
|
if (e.code !== ABORTED_CODE) {
|