@cloudbase/weda-ui 3.7.12 → 3.7.13

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.
@@ -138,9 +138,13 @@ export const BaseFormObj = forwardRef(function BaseFormObj(props, ref) {
138
138
  return value;
139
139
  };
140
140
  const dealObjChange = (params, objValue) => {
141
- var _a;
141
+ var _a, _b;
142
+ // 如果设置的是空对象,则认为是覆盖更新
143
+ if (!((_a = Object.keys(params.value)) === null || _a === void 0 ? void 0 : _a.length)) {
144
+ return params.value;
145
+ }
142
146
  let value;
143
- if ((_a = Object.keys(objValue || {})) === null || _a === void 0 ? void 0 : _a.length) {
147
+ if ((_b = Object.keys(objValue || {})) === null || _b === void 0 ? void 0 : _b.length) {
144
148
  value = deepClone({ ...objValue, ...params.value });
145
149
  }
146
150
  return value;
@@ -204,7 +208,7 @@ export const BaseFormObj = forwardRef(function BaseFormObj(props, ref) {
204
208
  ]);
205
209
  const changeDebounce = useDebouncedCallback(useCallback((value, option) => {
206
210
  change(value, option);
207
- }, [change]), 500);
211
+ }, [change]), 300);
208
212
  /**
209
213
  * 子组件默认值变更,触发嵌套表单值更新
210
214
  */
@@ -603,7 +603,7 @@ export const getWhereParam = (relatedKey, rowId) => {
603
603
  return whereList;
604
604
  };
605
605
  export const getCurrentPageData = (data = [], pageNo, pageSize) => {
606
- const records = [].concat(data);
606
+ const records = [].concat(deepClone(data));
607
607
  // eslint-disable-next-line @typescript-eslint/no-magic-numbers
608
608
  return records.slice((pageNo - 1) * pageSize, pageNo * pageSize) || []; // 当前页的数据
609
609
  };
@@ -548,7 +548,7 @@ export const WdTable = forwardRef(function TableComp(tableProps, ref) {
548
548
  }
549
549
  },
550
550
  // 当前页数据
551
- records: isExpression
551
+ records: isExpression && !enableTotal
552
552
  ? getCurrentPageData(dataRef.current.tableRecords, query.pageNo, query.pageSize)
553
553
  : dataRef.current.tableRecords,
554
554
  // 当前总数
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/weda-ui",
3
- "version": "3.7.12",
3
+ "version": "3.7.13",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index",
6
6
  "miniprogram": "mpdist",