apollo_form_pase
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -128,3 +128,4 @@ function _typeof(obj) { | ||
resertValue && resertValue({ | ||
key: ls | ||
key: ls, | ||
handleType: handleType | ||
}); | ||
@@ -154,15 +155,7 @@ | ||
_this.hiddenFilds(); | ||
// 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' }) | ||
// }) | ||
_this.formData.map(function (item) { | ||
if (!item.behaviors || !Array.isArray(item.behaviors) || item.behaviors.length === 0) return; | ||
var value = _this.handleFormaterValue(item.value, item); | ||
_this.handleBehavior({ | ||
currentValue: value, | ||
componentData: item, | ||
handleType: 'init' | ||
}); | ||
}); | ||
return _this; | ||
@@ -250,8 +243,9 @@ }; | ||
handleType: handleType | ||
}, _this.resertValueCallback); | ||
}, _this.resetValueCallback); | ||
}; | ||
this.resertValueCallback = function (_ref4) { | ||
this.resetValueCallback = function (_ref4) { | ||
var key = _ref4.key, | ||
value = _ref4.value; | ||
value = _ref4.value, | ||
handleType = _ref4.handleType; | ||
var componentData = _this.formData.find(function (ls) { | ||
@@ -263,3 +257,4 @@ return ls.name === key; | ||
currentValue: value, | ||
componentData: componentData | ||
componentData: componentData, | ||
handleType: handleType | ||
}); | ||
@@ -266,0 +261,0 @@ }; |
@@ -130,3 +130,4 @@ 'use strict'; | ||
resertValue && resertValue({ | ||
key: ls | ||
key: ls, | ||
handleType: handleType | ||
}); | ||
@@ -156,15 +157,7 @@ | ||
_this.hiddenFilds(); | ||
// 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' }) | ||
// }) | ||
_this.formData.map(function (item) { | ||
if (!item.behaviors || !Array.isArray(item.behaviors) || item.behaviors.length === 0) return; | ||
var value = _this.handleFormaterValue(item.value, item); | ||
_this.handleBehavior({ | ||
currentValue: value, | ||
componentData: item, | ||
handleType: 'init' | ||
}); | ||
}); | ||
return _this; | ||
@@ -252,8 +245,9 @@ }; | ||
handleType: handleType | ||
}, _this.resertValueCallback); | ||
}, _this.resetValueCallback); | ||
}; | ||
this.resertValueCallback = function (_ref4) { | ||
this.resetValueCallback = function (_ref4) { | ||
var key = _ref4.key, | ||
value = _ref4.value; | ||
value = _ref4.value, | ||
handleType = _ref4.handleType; | ||
var componentData = _this.formData.find(function (ls) { | ||
@@ -265,3 +259,4 @@ return ls.name === key; | ||
currentValue: value, | ||
componentData: componentData | ||
componentData: componentData, | ||
handleType: handleType | ||
}); | ||
@@ -268,0 +263,0 @@ }; |
{ | ||
"name": "apollo_form_pase", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -43,3 +43,3 @@ export const HandleClass = { | ||
} | ||
resertValue && resertValue({ key: ls }); | ||
resertValue && resertValue({ key: ls, handleType }); | ||
if (handleType !== 'init') { | ||
@@ -46,0 +46,0 @@ obj.value = void 0; //将目标组件清空 |
@@ -12,7 +12,8 @@ import { HandleClass } from './behavior'; | ||
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; | ||
@@ -59,7 +60,7 @@ } | ||
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, handleType }) => { | ||
const componentData = this.formData.find(ls => ls.name === key) || {}; | ||
this.handleBehavior({ currentValue: value, componentData }) | ||
this.handleBehavior({ currentValue: value, componentData, handleType }) | ||
} | ||
@@ -66,0 +67,0 @@ hiddenFilds = () => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43556
1300