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 CHANGED
@@ -3,6 +3,7 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.2.79: 整型浮点型为空时不校验
6
7
  - 2.2.78: 数据表计算值不生效
7
8
  - 2.2.77: 关联必填时,只读字段不需要必填
8
9
  - 2.2.76: 批示意见落款盖章样式调整
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',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.2.78",
3
+ "version": "2.2.79",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",