@gmfe/react 2.14.20 → 2.14.21-beta.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmfe/react",
3
- "version": "2.14.20",
3
+ "version": "2.14.21-beta.1",
4
4
  "description": "",
5
5
  "author": "liyatang <liyatang@qq.com>",
6
6
  "homepage": "https://github.com/gmfe/gmfe#readme",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@gm-common/tool": "^1.0.0",
30
- "@gmfe/locales": "^2.14.20",
30
+ "@gmfe/locales": "^2.14.21-beta.1",
31
31
  "big.js": "^5.2.2",
32
32
  "classnames": "^2.2.5",
33
33
  "lodash": "^4.17.14",
@@ -35,5 +35,5 @@
35
35
  "prop-types": "^15.7.2",
36
36
  "react-window": "^1.8.5"
37
37
  },
38
- "gitHead": "ffd6acec5aca29adfa9e078ea8a0bcbec7a9cd74"
38
+ "gitHead": "4b9dc7662ddbb5909016f8e3618b4643b0e7db02"
39
39
  }
@@ -61,13 +61,24 @@ const FormItem = withWrapContext(
61
61
  style,
62
62
  disabledCol ? {} : { width: _cw * col }
63
63
  )
64
+ // TODO 以前的判断逻辑有问题
65
+ // if (canValidate && validate !== undefined) {
66
+ // if (required) {
67
+ // help = validate(function(value) {
68
+ // return Validator.validate(Validator.TYPE.required, value)
69
+ // })
70
+ // } else {
71
+ // help = validate()
72
+ // }
73
+ // error = !!help
74
+ // }
75
+
64
76
  if (canValidate && validate !== undefined) {
65
- if (required) {
77
+ help = validate()
78
+ if (required && !help) {
66
79
  help = validate(function(value) {
67
80
  return Validator.validate(Validator.TYPE.required, value)
68
81
  })
69
- } else {
70
- help = validate()
71
82
  }
72
83
  error = !!help
73
84
  }