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
|
@@ -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
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
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 >
|
|
994
|
+
if (comment.length > 2000) {
|
|
991
995
|
_Toast2.default.show({
|
|
992
996
|
type: 'error',
|
|
993
|
-
content: '意见不能多于
|
|
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;
|