easy3wui 1.5.35-beta2 → 1.5.35
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/lib/Easy3wFormPage/index.js +16 -1
- package/package.json +1 -1
|
@@ -516,6 +516,13 @@ var Easy3wFormPage = function (_Component) {
|
|
|
516
516
|
var decoratorObj = {
|
|
517
517
|
rules: [{ required: required, message: requiredMessage || '\u8BF7\u586B\u5199' + label }].concat(addRules)
|
|
518
518
|
};
|
|
519
|
+
if (fieldType === 'braftEditor') {
|
|
520
|
+
decoratorObj = (0, _extends3['default'])({}, decoratorObj, {
|
|
521
|
+
trigger: 'onBlur',
|
|
522
|
+
// validateTrigger: 'onBlur',
|
|
523
|
+
rules: [{ required: required, message: requiredMessage || '\u8BF7\u586B\u5199' + label, validator: _this.validateContent }].concat(addRules)
|
|
524
|
+
});
|
|
525
|
+
}
|
|
519
526
|
if (itemValue || itemValue === 0) {
|
|
520
527
|
decoratorObj = (0, _extends3['default'])({}, decoratorObj, {
|
|
521
528
|
initialValue: itemValue
|
|
@@ -1472,7 +1479,13 @@ var Easy3wFormPage = function (_Component) {
|
|
|
1472
1479
|
if (readFlag || allReadFlag || cmptPros && cmptPros.readOnly) {
|
|
1473
1480
|
cmptPros.controls = [];
|
|
1474
1481
|
}
|
|
1475
|
-
return _react2['default'].createElement(_braftEditor2['default'], (0, _extends3['default'])({ readOnly: readFlag || allReadFlag }, cmptPros));
|
|
1482
|
+
return _react2['default'].createElement(_braftEditor2['default'], (0, _extends3['default'])({ readOnly: readFlag || allReadFlag }, cmptPros, { style: { border: '1px solid #eee' } }));
|
|
1483
|
+
}, _this.validateContent = function (rule, value, callback) {
|
|
1484
|
+
if (value.isEmpty()) {
|
|
1485
|
+
callback(rule.message);
|
|
1486
|
+
} else {
|
|
1487
|
+
callback();
|
|
1488
|
+
}
|
|
1476
1489
|
}, _this.cascaderHandler = function (item) {
|
|
1477
1490
|
var cmptPros = item.cmptPros;
|
|
1478
1491
|
|
|
@@ -1684,6 +1697,8 @@ var Easy3wFormPage = function (_Component) {
|
|
|
1684
1697
|
|
|
1685
1698
|
/** braftEditor start */
|
|
1686
1699
|
|
|
1700
|
+
// 文章内容校验
|
|
1701
|
+
|
|
1687
1702
|
/** braftEditor end */
|
|
1688
1703
|
|
|
1689
1704
|
/** cascader start */
|