@hzab/list-render 1.10.14 → 1.10.16

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,11 @@
1
+ # @hzab/list-render@1.10.16
2
+
3
+ fix: model?.patchMap 类型判断修复
4
+
5
+ # @hzab/list-render@1.10.15
6
+
7
+ fix: getList 函数分页控制异常修复
8
+
1
9
  # @hzab/list-render@1.10.14
2
10
 
3
11
  fix: table function title input 输入中文异常修复
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@hzab/list-render",
3
- "version": "1.10.14",
3
+ "version": "1.10.16",
4
4
  "description": "",
5
5
  "main": "src",
6
6
  "scripts": {
7
7
  "dev": "webpack serve -c ./config/webpack.config.js --env local",
8
8
  "build": "webpack -c ./config/webpack.config.js --env production",
9
- "publish-beta": "npm publish --beta",
9
+ "release:alpha": "npm version prerelease --preid=alpha && npm publish --tag alpha",
10
+ "release:beta": "npm version prerelease --preid=beta && npm publish --tag beta",
10
11
  "publish-patch": "npm version patch && npm publish --access public",
11
12
  "publish-minor": "npm version minor && npm publish --access public",
12
13
  "publish-major": "npm version major && npm publish --access public"
@@ -149,8 +149,7 @@ const ListRender = forwardRef(function (props, parentRef) {
149
149
  setListLoading(true);
150
150
  const { list } = props;
151
151
  const { pageNum = 1, pageSize = pageSizeOptions[0] } = paginationQueryRef.current || {};
152
-
153
- setList(list.slice(pageSize * (pageNum - 1), pageNum * pageSize));
152
+ setList(props?.hasPagination === false ? list : list.slice(pageSize * (pageNum - 1), pageNum * pageSize));
154
153
  setTotal(list.length);
155
154
  props.onGetListEnd && props.onGetListEnd({ list, pagination: { pageNum, pageSize } });
156
155
  setListLoading(false);
@@ -385,7 +384,7 @@ const ListRender = forwardRef(function (props, parentRef) {
385
384
  async function onEditSubmit(data, opt) {
386
385
  let _data = data;
387
386
  if (isPatchUpdate) {
388
- if (model?.patchMap === "function") {
387
+ if (typeof model?.patchMap === "function") {
389
388
  _data = model.patchMap(data, opt);
390
389
  }
391
390
  } else if (typeof model?.updateMap === "function") {