@sheinx/hooks 3.5.8-beta.3 → 3.5.8-beta.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/hooks",
3
- "version": "3.5.8-beta.3",
3
+ "version": "3.5.8-beta.5",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",