From 0d55427ffdeb1bdfd23f98481d18868da894afc6 Mon Sep 17 00:00:00 2001 From: manzhenhua Date: Thu, 7 Nov 2019 17:42:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/behavior.js | 2 +- src/index.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 193f10c..e96624f 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 5a4058b..5b3fadc 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 3932580..70234b9 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') -- 2.21.0