@sheinx/hooks 3.5.8-beta.3 → 3.5.8-beta.5
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.
@@ -162,7 +162,7 @@ var useForm = function useForm(props) {
|
|
162
162
|
return new Promise(function (resolve, reject) {
|
163
163
|
var finalFields = Object.keys(context.validateMap);
|
164
164
|
if (fields) {
|
165
|
-
if (config.ignoreChildren) {
|
165
|
+
if (config.ignoreChildren || config.ignoreBind) {
|
166
166
|
// 旧行为:仅校验当前字段
|
167
167
|
finalFields = ((0, _utils.isArray)(fields) ? fields : [fields]).filter(function (key) {
|
168
168
|
return context.validateMap[key];
|
@@ -59,7 +59,7 @@ var useInputFormat = function useInputFormat(props) {
|
|
59
59
|
// 修正小数位数
|
60
60
|
var _value = v.split('.');
|
61
61
|
var __value = value.split('.');
|
62
|
-
if (_value[1] !== undefined && __value[1] === undefined) {
|
62
|
+
if (_value[1] !== undefined && __value[1] === undefined && digits !== 0) {
|
63
63
|
value = "".concat(value, ".").concat(_value[1]);
|
64
64
|
}
|
65
65
|
}
|
@@ -153,7 +153,7 @@ var useForm = function useForm(props) {
|
|
153
153
|
return new Promise(function (resolve, reject) {
|
154
154
|
var finalFields = Object.keys(context.validateMap);
|
155
155
|
if (fields) {
|
156
|
-
if (config.ignoreChildren) {
|
156
|
+
if (config.ignoreChildren || config.ignoreBind) {
|
157
157
|
// 旧行为:仅校验当前字段
|
158
158
|
finalFields = (isArray(fields) ? fields : [fields]).filter(function (key) {
|
159
159
|
return context.validateMap[key];
|
@@ -52,7 +52,7 @@ var useInputFormat = function useInputFormat(props) {
|
|
52
52
|
// 修正小数位数
|
53
53
|
var _value = v.split('.');
|
54
54
|
var __value = value.split('.');
|
55
|
-
if (_value[1] !== undefined && __value[1] === undefined) {
|
55
|
+
if (_value[1] !== undefined && __value[1] === undefined && digits !== 0) {
|
56
56
|
value = "".concat(value, ".").concat(_value[1]);
|
57
57
|
}
|
58
58
|
}
|