@hzab/list-render 1.9.6 → 1.9.7

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # @hzab/list-render@1.9.7
2
+
3
+ fix: 修复 分页配置时数据覆盖问题
4
+
1
5
  # @hzab/list-render@1.9.6
2
6
 
3
7
  feat: 新增列筛选,筛选项显隐
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/list-render",
3
- "version": "1.9.6",
3
+ "version": "1.9.7",
4
4
  "description": "",
5
5
  "main": "src",
6
6
  "scripts": {
@@ -41,8 +41,6 @@ export const PrefixNode = (props) => {
41
41
  return showVal?.map((it, i) => {
42
42
  const option = getFieldOptItByVal(it, _field) || {};
43
43
  const PreNode = option.PrefixNode;
44
- console.log(it, option);
45
-
46
44
  return (
47
45
  <div key={it + "" + i} className="table-cell-prefix-box">
48
46
  {PreNode ? (
@@ -72,7 +72,10 @@ const ListRender = forwardRef(function (props, parentRef) {
72
72
  model.query = {};
73
73
  } else {
74
74
  modelQueryRef.current = model?.query;
75
- paginationQueryRef.current = model?.query;
75
+ paginationQueryRef.current = {
76
+ pageNum: model?.query?.pageNum ?? paginationQueryRef.current?.pageNum,
77
+ pageSize: model?.query?.pageSize ?? paginationQueryRef.current?.pageSize,
78
+ };
76
79
  }
77
80
  model.query.pageNum = 1;
78
81
  }
@@ -192,7 +192,6 @@ function TableRender(props) {
192
192
  //详情按钮权限
193
193
  const _hasDetail =
194
194
  hasDetail && typeof hasDetail === "function" ? hasDetail(record, index) : hasDetail !== false;
195
- console.log("_hasDetail", hasDetail, _hasDetail);
196
195
 
197
196
  //删除按钮权限
198
197
  const _hasDel = hasDel && typeof hasDel === "function" ? hasDel(record, index) : hasDel !== false;
@@ -247,7 +246,6 @@ function TableRender(props) {
247
246
 
248
247
  setColumns(columns);
249
248
  setColumnList(columns);
250
- console.log("columns", columns);
251
249
  }, [props.schema, props.config]);
252
250
 
253
251
  // 解决 FormilyField 中无相关参数报错的问题。自定义参数都从这里传入
@@ -256,8 +254,6 @@ function TableRender(props) {
256
254
  };
257
255
 
258
256
  const onChange = (e, col) => {
259
- console.log(`checked = ${e.target.checked}`);
260
-
261
257
  if (e.target.checked) {
262
258
  const list = [...columns, col];
263
259
  // 创建映射表提高查找效率