Commit 1c617bf0 authored by 满振华's avatar 满振华

修改表单pase

parent a1040280
......@@ -9,11 +9,12 @@ class HandleBehavior {
}
if (!this.formData) return
this.hiddenFilds();
this.formData.map(item => {
if (!item.behaviors || !Array.isArray(item.behaviors) || item.behaviors.length === 0) return;
const value = this.handleFormaterValue(item.value, item);
this.handleBehavior({ currentValue: value, componentData: item, handleType: 'init' })
})
fi
// this.formData.map(item => {
// if (!item.behaviors || !Array.isArray(item.behaviors) || item.behaviors.length === 0) return;
// const value = this.handleFormaterValue(item.value, item);
// this.handleBehavior({ currentValue: value, componentData: item, handleType: 'init' })
// })
return this;
}
getFormData = () => {
......@@ -55,9 +56,9 @@ class HandleBehavior {
const behaviorInstance = HandleClass[behavior.behaviorValue];
if (!behaviorInstance || !behaviorInstance.fun) return;
let formData = this.formData;
this.formData = behaviorInstance.fun({ value, behavior, behaviors, formData, componentData, handleType }, this.resertValueCallback);
this.formData = behaviorInstance.fun({ value, behavior, behaviors, formData, componentData, handleType }, this.resetValueCallback);
}
resertValueCallback = ({ key, value }) => {
resetValueCallback = ({ key, value }) => {
const componentData = this.formData.find(ls => ls.name === key) || {};
this.handleBehavior({ currentValue: value, componentData })
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment