@autobest-ui/components 2.7.2 → 2.7.3
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.
|
@@ -230,8 +230,10 @@ var InputNumberNotRef = /** @class */function (_super) {
|
|
|
230
230
|
var nextState = {};
|
|
231
231
|
// 判断是否为受控方式
|
|
232
232
|
if ('value' in nextProps) {
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
if (nextProps.value !== prevStates.parserValue && (
|
|
234
|
+
// 兼容外部传入空string/null的情况, 只有当一个值非空时,才会重新重置State信息
|
|
235
|
+
!isBlank(nextProps.value) || !isBlank(prevStates.parserValue))) {
|
|
236
|
+
var fixedValueStr = toFixed(nextProps.value, nextProps.precision);
|
|
235
237
|
nextState.parserValue = getNumberFromString(fixedValueStr);
|
|
236
238
|
nextState.originalValueStr = fixedValueStr;
|
|
237
239
|
}
|
|
@@ -237,8 +237,10 @@ var InputNumberNotRef = /** @class */function (_super) {
|
|
|
237
237
|
var nextState = {};
|
|
238
238
|
// 判断是否为受控方式
|
|
239
239
|
if ('value' in nextProps) {
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
if (nextProps.value !== prevStates.parserValue && (
|
|
241
|
+
// 兼容外部传入空string/null的情况, 只有当一个值非空时,才会重新重置State信息
|
|
242
|
+
!(0, _utils.isBlank)(nextProps.value) || !(0, _utils.isBlank)(prevStates.parserValue))) {
|
|
243
|
+
var fixedValueStr = (0, _utils.toFixed)(nextProps.value, nextProps.precision);
|
|
242
244
|
nextState.parserValue = (0, _utils.getNumberFromString)(fixedValueStr);
|
|
243
245
|
nextState.originalValueStr = fixedValueStr;
|
|
244
246
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autobest-ui/components",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "components common ui for React",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@autobest-ui/utils": "^2.1.1"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "6588e405cc73a5f55cbe22315e89d741945fd85a"
|
|
56
56
|
}
|