fmui-base 2.3.51 → 2.3.52

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.3.52:移动端批示意见为空时允许保存并显示落款
6
7
  - 2.3.51:移动表单支持矩阵表单设置的字段名称字段内容的字体大小及颜色
7
8
  - 2.3.50:移动表单支持数据表字段宏值和关联值支持获取用户的性别、政治面貌和民族
8
9
  - 2.3.49:加签意见显示加签标识
@@ -1322,6 +1322,10 @@ var PageHome = function (_React$Component) {
1322
1322
  });
1323
1323
  return false;
1324
1324
  }
1325
+ // 允许为空时传 ""(勿用 undefined,否则 JSON 会丢 comment 字段导致不落库)
1326
+ if (typeof newComment == "undefined" || newComment == null || (newComment + '').trim() == '') {
1327
+ newComment = "";
1328
+ }
1325
1329
  }
1326
1330
  }
1327
1331
  if (operate == 1) {
@@ -2465,6 +2469,10 @@ var PageHome = function (_React$Component) {
2465
2469
  });
2466
2470
  return false;
2467
2471
  }
2472
+ // 允许为空时传 ""(勿用 undefined,否则 JSON 会丢 comment 字段导致不落库)
2473
+ if (typeof newComment == "undefined" || newComment == null || (newComment + '').trim() == '') {
2474
+ newComment = "";
2475
+ }
2468
2476
  }
2469
2477
  //判断是否保存常用语
2470
2478
  var savePhrase = this.state.savePhrase;
@@ -981,16 +981,20 @@ var PageHome = function (_React$Component) {
981
981
 
982
982
  if (comment != '' && comment != null) {
983
983
  if (comment.trim() == '' && hasCommentField == '1') {
984
- _Toast2.default.show({
985
- type: 'error',
986
- content: '意见不能为空!'
987
- });
988
- return false;
984
+ if (commentIsNotNull == '1') {
985
+ _Toast2.default.show({
986
+ type: 'error',
987
+ content: '意见不能为空!'
988
+ });
989
+ return false;
990
+ }
991
+ // 允许为空时传 ""
992
+ comment = "";
989
993
  }
990
- if (comment.length > 200) {
994
+ if (comment.length > 2000) {
991
995
  _Toast2.default.show({
992
996
  type: 'error',
993
- content: '意见不能多于200字!'
997
+ content: '意见不能多于2000字!'
994
998
  });
995
999
  return false;
996
1000
  }
@@ -1002,6 +1006,10 @@ var PageHome = function (_React$Component) {
1002
1006
  });
1003
1007
  return false;
1004
1008
  }
1009
+ // 允许为空时传 ""(勿用 undefined,否则 JSON 会丢 comment 字段导致不落库)
1010
+ if (hasCommentField == '1' && (typeof comment == "undefined" || comment == null || (comment + '').trim() == '')) {
1011
+ comment = "";
1012
+ }
1005
1013
  }
1006
1014
 
1007
1015
  //判断是否保存常用语
@@ -2353,6 +2353,10 @@ var PageHome = function (_React$Component) {
2353
2353
  });
2354
2354
  return false;
2355
2355
  }
2356
+ // 允许为空时传 ""(勿用 undefined,否则 JSON 会丢 comment 字段导致不落库)
2357
+ if (typeof newComment == "undefined" || newComment == null || (newComment + '').trim() == '') {
2358
+ newComment = "";
2359
+ }
2356
2360
  }
2357
2361
  }
2358
2362
  if (operate == 1) {
@@ -4059,6 +4063,10 @@ var PageHome = function (_React$Component) {
4059
4063
  });
4060
4064
  return false;
4061
4065
  }
4066
+ // 允许为空时传 ""(勿用 undefined,否则 JSON 会丢 comment 字段导致不落库)
4067
+ if (typeof newComment == "undefined" || newComment == null || (newComment + '').trim() == '') {
4068
+ newComment = "";
4069
+ }
4062
4070
  }
4063
4071
  //判断是否保存常用语
4064
4072
  var savePhrase = this.state.savePhrase;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.3.51",
3
+ "version": "2.3.52",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",