@hzab/list-render 1.10.15 → 1.10.17

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,6 +1,14 @@
1
+ # @hzab/list-render@1.10.17
2
+
3
+ fix: createMap updateMap 支持异步
4
+
5
+ # @hzab/list-render@1.10.16
6
+
7
+ fix: model?.patchMap 类型判断修复
8
+
1
9
  # @hzab/list-render@1.10.15
2
10
 
3
- fix: getList函数分页控制异常修复
11
+ fix: getList 函数分页控制异常修复
4
12
 
5
13
  # @hzab/list-render@1.10.14
6
14
 
package/package.json CHANGED
@@ -1,15 +1,19 @@
1
1
  {
2
2
  "name": "@hzab/list-render",
3
- "version": "1.10.15",
3
+ "version": "1.10.17",
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",
10
- "publish-patch": "npm version patch && npm publish --access public",
11
- "publish-minor": "npm version minor && npm publish --access public",
12
- "publish-major": "npm version major && npm publish --access public"
9
+ "version:alpha": "npm version prerelease --preid=alpha",
10
+ "publish:alpha": "npm publish --tag alpha",
11
+ "version:beta": "npm version prerelease --preid=beta",
12
+ "publish:beta": "npm publish --tag beta",
13
+ "version:patch": "npm version patch",
14
+ "version:minior": "npm version minor",
15
+ "version:major": "npm version major",
16
+ "publish:stable": "npm publish --access public"
13
17
  },
14
18
  "files": [
15
19
  "src",
@@ -294,7 +294,10 @@ const ListRender = forwardRef(function (props, parentRef) {
294
294
  }
295
295
 
296
296
  async function onCreateSubmit(data) {
297
- let _data = typeof model?.createMap === "function" ? model.createMap(data) : data;
297
+ let _data = data;
298
+ if (typeof model?.createMap === "function") {
299
+ _data = await model.createMap(data);
300
+ }
298
301
  if (useFormData) {
299
302
  _data = objToFormData(_data);
300
303
  }
@@ -384,11 +387,11 @@ const ListRender = forwardRef(function (props, parentRef) {
384
387
  async function onEditSubmit(data, opt) {
385
388
  let _data = data;
386
389
  if (isPatchUpdate) {
387
- if (model?.patchMap === "function") {
388
- _data = model.patchMap(data, opt);
390
+ if (typeof model?.patchMap === "function") {
391
+ _data = await model.patchMap(data, opt);
389
392
  }
390
393
  } else if (typeof model?.updateMap === "function") {
391
- _data = model.updateMap(data, opt);
394
+ _data = await model.updateMap(data, opt);
392
395
  }
393
396
 
394
397
  // 行内编辑确认前的校验