easy3wui 1.5.25 → 1.5.26
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.
|
@@ -491,7 +491,7 @@ var Easy3wFormPage = function (_Component) {
|
|
|
491
491
|
if (disableFlag) {
|
|
492
492
|
//
|
|
493
493
|
} else {
|
|
494
|
-
addRules = [{ max: maxLength, message: '\u5F55\u5165\u6587\u5B57\u957F\u5EA6\u4E0D\u80FD\u8D85\u8FC7' + maxLength }].concat(addRules);
|
|
494
|
+
addRules = [{ max: maxLength, message: '\u5F55\u5165\u6587\u5B57\u957F\u5EA6\u4E0D\u80FD\u8D85\u8FC7' + maxLength, transform: _this.touchTransform }].concat(addRules);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
var decoratorObj = {
|
|
@@ -645,6 +645,12 @@ var Easy3wFormPage = function (_Component) {
|
|
|
645
645
|
)
|
|
646
646
|
);
|
|
647
647
|
}
|
|
648
|
+
}, _this.touchTransform = function (value) {
|
|
649
|
+
var strValue = value;
|
|
650
|
+
if (typeof value === 'number') {
|
|
651
|
+
strValue = String(value);
|
|
652
|
+
}
|
|
653
|
+
return strValue;
|
|
648
654
|
}, _this.getStrTemplateItem = function (item, itemArea) {
|
|
649
655
|
var _this$props2 = _this.props,
|
|
650
656
|
form = _this$props2.form,
|
|
@@ -1524,6 +1530,8 @@ var Easy3wFormPage = function (_Component) {
|
|
|
1524
1530
|
|
|
1525
1531
|
/** 获取FormItem */
|
|
1526
1532
|
|
|
1533
|
+
// 检验长度前转换字段值为字符串
|
|
1534
|
+
|
|
1527
1535
|
/** 获取单行 */
|
|
1528
1536
|
|
|
1529
1537
|
/** 单列 */
|
|
@@ -40,9 +40,24 @@ var Easy3wGridInput = function (_Component) {
|
|
|
40
40
|
(0, _inherits3['default'])(Easy3wGridInput, _Component);
|
|
41
41
|
|
|
42
42
|
function Easy3wGridInput() {
|
|
43
|
+
var _temp, _this, _ret;
|
|
44
|
+
|
|
43
45
|
(0, _classCallCheck3['default'])(this, Easy3wGridInput);
|
|
44
|
-
|
|
46
|
+
|
|
47
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
48
|
+
args[_key] = arguments[_key];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.touchTransform = function (value) {
|
|
52
|
+
var strValue = value;
|
|
53
|
+
if (typeof value === 'number') {
|
|
54
|
+
strValue = String(value);
|
|
55
|
+
}
|
|
56
|
+
return strValue;
|
|
57
|
+
}, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret);
|
|
45
58
|
}
|
|
59
|
+
// 检验长度前转换字段值为字符串
|
|
60
|
+
|
|
46
61
|
|
|
47
62
|
Easy3wGridInput.prototype.render = function render() {
|
|
48
63
|
var _props = this.props,
|
|
@@ -61,7 +76,7 @@ var Easy3wGridInput = function (_Component) {
|
|
|
61
76
|
maxLength = _ref.maxLength,
|
|
62
77
|
disabled = _ref.disabled;
|
|
63
78
|
|
|
64
|
-
var rules = [{ required: required, message: requiredMessage || '\u8BF7\u586B\u5199' + label }, { pattern: pattern, message: patternMessage }, { max: maxLength || 50, message: '\u5F55\u5165\u6587\u5B57\u957F\u5EA6\u4E0D\u80FD\u8D85\u8FC7' + (maxLength || 50) }];
|
|
79
|
+
var rules = [{ required: required, message: requiredMessage || '\u8BF7\u586B\u5199' + label }, { pattern: pattern, message: patternMessage }, { max: maxLength || 50, message: '\u5F55\u5165\u6587\u5B57\u957F\u5EA6\u4E0D\u80FD\u8D85\u8FC7' + (maxLength || 50), transform: this.touchTransform }];
|
|
65
80
|
if (disabled) {
|
|
66
81
|
rules.pop();
|
|
67
82
|
}
|
|
@@ -42,9 +42,24 @@ var Easy3wGridTextArea = function (_Component) {
|
|
|
42
42
|
(0, _inherits3['default'])(Easy3wGridTextArea, _Component);
|
|
43
43
|
|
|
44
44
|
function Easy3wGridTextArea() {
|
|
45
|
+
var _temp, _this, _ret;
|
|
46
|
+
|
|
45
47
|
(0, _classCallCheck3['default'])(this, Easy3wGridTextArea);
|
|
46
|
-
|
|
48
|
+
|
|
49
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
50
|
+
args[_key] = arguments[_key];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.touchTransform = function (value) {
|
|
54
|
+
var strValue = value;
|
|
55
|
+
if (typeof value === 'number') {
|
|
56
|
+
strValue = String(value);
|
|
57
|
+
}
|
|
58
|
+
return strValue;
|
|
59
|
+
}, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret);
|
|
47
60
|
}
|
|
61
|
+
// 检验长度前转换字段值为字符串
|
|
62
|
+
|
|
48
63
|
|
|
49
64
|
Easy3wGridTextArea.prototype.render = function render() {
|
|
50
65
|
var _props = this.props,
|
|
@@ -65,7 +80,7 @@ var Easy3wGridTextArea = function (_Component) {
|
|
|
65
80
|
if (!rows) {
|
|
66
81
|
cmptPros = (0, _extends3['default'])({ autosize: { minRows: 2, maxRows: true } }, cmptPros);
|
|
67
82
|
}
|
|
68
|
-
var rules = [{ required: required, message: requiredMessage || '\u8BF7\u586B\u5199' + label }, { max: maxLength || 1000, message: '\u5F55\u5165\u6587\u5B57\u957F\u5EA6\u4E0D\u80FD\u8D85\u8FC7' + (maxLength || 1000) }];
|
|
83
|
+
var rules = [{ required: required, message: requiredMessage || '\u8BF7\u586B\u5199' + label }, { max: maxLength || 1000, message: '\u5F55\u5165\u6587\u5B57\u957F\u5EA6\u4E0D\u80FD\u8D85\u8FC7' + (maxLength || 1000), transform: this.touchTransform }];
|
|
69
84
|
if (disabled) {
|
|
70
85
|
rules.pop();
|
|
71
86
|
}
|