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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zzz-pc-view",
3
- "version": "0.0.130",
3
+ "version": "0.0.131",
4
4
  "main": "src/index.umd.js",
5
5
  "module": "src/index.es.js",
6
6
  "types": "src/index.d.ts",
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(this.CurdTarget.bindList(data.list || []), data.total);
5972
+ this.setList(data.list || [], data.total);
5973
5973
  } else {
5974
5974
  const data = await this.listRequestUtil.requestData(api2.getList(query));
5975
- this.setList(this.CurdTarget.bindList(data || []), data.length);
5975
+ this.setList(data || [], (data == null ? void 0 : data.length) ?? 0);
5976
5976
  }
5977
5977
  } catch (e) {
5978
5978
  if (e.code !== ABORTED_CODE) {