@gmfe/react 2.14.26-beta.0 → 2.14.26

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.26-beta.0",
3
+ "version": "2.14.26",
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.26-beta.0",
30
+ "@gmfe/locales": "^2.14.26",
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": "536b1cbe2600f51dc308f1aba4e97743e0222d98"
38
+ "gitHead": "2fc65546df80d52dcfb37c2c35b615dbade5daa9"
39
39
  }
@@ -109,7 +109,7 @@ const Overlay = ({
109
109
  id={v.value}
110
110
  >
111
111
  {v.name}&nbsp;
112
- {Array.isArray(v.children) && v.children.length > 0 && (
112
+ {v.children && v.children.length && (
113
113
  <i className={classNames('gm-arrow-right')} />
114
114
  )}
115
115
  </Flex>
@@ -183,6 +183,7 @@ class Cascader extends React.Component {
183
183
  }
184
184
  }
185
185
  })
186
+
186
187
  return result
187
188
  }
188
189
 
@@ -340,6 +341,7 @@ class Cascader extends React.Component {
340
341
  const { data } = this.state
341
342
  const inputValue = this.inputValueRender()
342
343
  let { inputProps } = this.props
344
+
343
345
  const selected = this.props.value || this.state.selected
344
346
  const value = []
345
347
  if (selected.length > 0) {
@@ -61,24 +61,13 @@ 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
-
76
64
  if (canValidate && validate !== undefined) {
77
- help = validate()
78
- if (required && !help) {
65
+ if (required) {
79
66
  help = validate(function(value) {
80
67
  return Validator.validate(Validator.TYPE.required, value)
81
68
  })
69
+ } else {
70
+ help = validate()
82
71
  }
83
72
  error = !!help
84
73
  }
@@ -78,7 +78,9 @@ class InputNumberV2 extends React.Component {
78
78
  // 一旦不一致就应该改,要比较 number 形式
79
79
  if (props.value !== text2Number(state.value)) {
80
80
  return {
81
- value: processPropsValue(props.value)
81
+ value: processPropsValue(
82
+ props.forceInnerValue ? state.value : props.value
83
+ )
82
84
  }
83
85
  }
84
86
 
@@ -147,12 +149,14 @@ InputNumberV2.propTypes = {
147
149
  onChange: PropTypes.func.isRequired,
148
150
  precision: PropTypes.number, // 精确度,保留几位小数
149
151
  className: PropTypes.string,
150
- style: PropTypes.object
152
+ style: PropTypes.object,
153
+ forceInnerValue: PropTypes.bool // 修复场景:删除1.09会将 .0 一起删除
151
154
  }
152
155
 
153
156
  InputNumberV2.defaultProps = {
154
157
  value: null,
155
- precision: 2
158
+ precision: 2,
159
+ forceInnerValue: false
156
160
  }
157
161
 
158
162
  export default InputNumberV2
package/LICENSE.md DELETED
@@ -1,4 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 GMFE
4
-