diff --git a/package.json b/package.json index 193f10cdf3de707aaa2da70810662da2d8f2b3af..e96624f44361192f6a59187e064b561f18e66466 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "apollo_form_pase", - "version": "0.0.8", + "version": "0.0.9", "description": "", "main": "dist/index.js", "module": "dist/index.esm.js", diff --git a/src/behavior.js b/src/behavior.js index 5a4058b109db74ec1c100ffc3ac1db4da07d39ab..5b3fadc62ac81bb3fae06fcb34433959b2f456b6 100644 --- a/src/behavior.js +++ b/src/behavior.js @@ -40,7 +40,7 @@ export const HandleClass = { ...obj.behaviorResult, paramsJson, } - resertValue && resertValue({ key: ls }); + resertValue && resertValue({ key: ls, handleType }); if (handleType !== 'init') { obj.value = void 0; //将目标组件清空 } diff --git a/src/index.js b/src/index.js index 393258069cd4958019a86ed904480609f85f0563..70234b9b412939cb033af6117ae910a96e3c525c 100644 --- a/src/index.js +++ b/src/index.js @@ -58,9 +58,9 @@ class HandleBehavior { let formData = this.formData; this.formData = behaviorInstance.fun({ value, behavior, behaviors, formData, componentData, handleType }, this.resetValueCallback); } - resetValueCallback = ({ key, value }) => { + resetValueCallback = ({ key, value, handleType }) => { const componentData = this.formData.find(ls => ls.name === key) || {}; - this.handleBehavior({ currentValue: value, componentData }) + this.handleBehavior({ currentValue: value, componentData, handleType }) } hiddenFilds = () => { this.formData = this.formData.filter(item => item.type !== 'hidden')