fmui-base 2.2.78 → 2.2.79
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/README.md +1 -0
- package/lib/form/form.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/form/form.js
CHANGED
|
@@ -2242,7 +2242,7 @@ var PageHome = function (_React$Component) {
|
|
|
2242
2242
|
return false;
|
|
2243
2243
|
}
|
|
2244
2244
|
}
|
|
2245
|
-
if (inputFormat == 'float' || fieldType == 'float') {
|
|
2245
|
+
if ((inputFormat == 'float' || fieldType == 'float') && newValue != '') {
|
|
2246
2246
|
if (!Number(newValue) && !patrn.test(Number(newValue))) {
|
|
2247
2247
|
_Toast2.default.show({
|
|
2248
2248
|
type: 'error',
|
|
@@ -2261,7 +2261,7 @@ var PageHome = function (_React$Component) {
|
|
|
2261
2261
|
}
|
|
2262
2262
|
}
|
|
2263
2263
|
}
|
|
2264
|
-
} else if (inputFormat == 'int') {
|
|
2264
|
+
} else if (inputFormat == 'int' && newValue != '') {
|
|
2265
2265
|
if (!/^-?[0-9]\d*$/.test(newValue)) {
|
|
2266
2266
|
_Toast2.default.show({
|
|
2267
2267
|
type: 'error',
|
|
@@ -2437,7 +2437,7 @@ var PageHome = function (_React$Component) {
|
|
|
2437
2437
|
return false;
|
|
2438
2438
|
}
|
|
2439
2439
|
}
|
|
2440
|
-
if (inputFormat == 'float' || fieldType == 'float') {
|
|
2440
|
+
if ((inputFormat == 'float' || fieldType == 'float') && newValue != '') {
|
|
2441
2441
|
if (!Number(newValue) && !patrn.test(Number(newValue))) {
|
|
2442
2442
|
_Toast2.default.show({
|
|
2443
2443
|
type: 'error',
|
|
@@ -2456,7 +2456,7 @@ var PageHome = function (_React$Component) {
|
|
|
2456
2456
|
}
|
|
2457
2457
|
}
|
|
2458
2458
|
}
|
|
2459
|
-
} else if (inputFormat == 'int') {
|
|
2459
|
+
} else if (inputFormat == 'int' && newValue != '') {
|
|
2460
2460
|
if (!/^-?[0-9]\d*$/.test(newValue)) {
|
|
2461
2461
|
_Toast2.default.show({
|
|
2462
2462
|
type: 'error',
|