easy3wui 1.5.34 → 1.5.35-beta2

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.
@@ -14,15 +14,15 @@
14
14
  flex: 0 0 62.5%;
15
15
  width: 62.5%;
16
16
  padding-right: 152px;
17
+ zoom: 1;
17
18
  }
18
- .e3wException .e3wExceptionImgBlock::before {
19
+ .e3wException .e3wExceptionImgBlock::before,
20
+ .e3wException .e3wExceptionImgBlock::after {
19
21
  display: table;
20
22
  content: '';
21
23
  }
22
24
  .e3wException .e3wExceptionImgBlock::after {
23
- display: table;
24
25
  clear: both;
25
- content: '';
26
26
  }
27
27
  .e3wException .e3wExceptionImgEle {
28
28
  height: 360px;
@@ -38,3 +38,6 @@ input.ant-input-number-input {
38
38
  .rightText {
39
39
  text-align: right;
40
40
  }
41
+ .bf-container.read-only .bf-controlbar {
42
+ display: none;
43
+ }
package/assets/index.css CHANGED
@@ -374,15 +374,15 @@ s {
374
374
  flex: 0 0 62.5%;
375
375
  width: 62.5%;
376
376
  padding-right: 152px;
377
+ zoom: 1;
377
378
  }
378
- .e3wException .e3wExceptionImgBlock::before {
379
+ .e3wException .e3wExceptionImgBlock::before,
380
+ .e3wException .e3wExceptionImgBlock::after {
379
381
  display: table;
380
382
  content: '';
381
383
  }
382
384
  .e3wException .e3wExceptionImgBlock::after {
383
- display: table;
384
385
  clear: both;
385
- content: '';
386
386
  }
387
387
  .e3wException .e3wExceptionImgEle {
388
388
  height: 360px;
@@ -1418,6 +1418,9 @@ input.ant-input-number-input {
1418
1418
  .rightText {
1419
1419
  text-align: right;
1420
1420
  }
1421
+ .bf-container.read-only .bf-controlbar {
1422
+ display: none;
1423
+ }
1421
1424
  .e3wFootBtn {
1422
1425
  margin: 0px 8px;
1423
1426
  }
@@ -1449,7 +1452,7 @@ input.ant-input-number-input {
1449
1452
  color: #52c41a;
1450
1453
  }
1451
1454
  .e3wResult .e3wResultIcon > .e3wResultError {
1452
- color: #ff4d4f;
1455
+ color: #f5222d;
1453
1456
  }
1454
1457
  .e3wResult .e3wResultTitle {
1455
1458
  font-size: 24px;
package/assets/result.css CHANGED
@@ -16,7 +16,7 @@
16
16
  color: #52c41a;
17
17
  }
18
18
  .e3wResult .e3wResultIcon > .e3wResultError {
19
- color: #ff4d4f;
19
+ color: #f5222d;
20
20
  }
21
21
  .e3wResult .e3wResultTitle {
22
22
  font-size: 24px;
@@ -192,6 +192,14 @@ var _braftEditor2 = _interopRequireDefault(_braftEditor);
192
192
 
193
193
  require('braft-editor/dist/index.css');
194
194
 
195
+ var _table = require('braft-extensions/dist/table');
196
+
197
+ var _table2 = _interopRequireDefault(_table);
198
+
199
+ require('braft-extensions/dist/table.css');
200
+
201
+ require('braft-editor/dist/output.css');
202
+
195
203
  var _dva = require('dva');
196
204
 
197
205
  var _easy3wui = require('easy3wui');
@@ -203,6 +211,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd
203
211
  // import Easy3wUploadB from '../../Easy3wUploadB';
204
212
  // import Easy3wUploadM from '../../Easy3wUploadM';
205
213
 
214
+ // 引入富文本表格功能
215
+ var options = {
216
+ defaultRows: 3, // 默认行数
217
+ defaultColumns: 3, // 默认列数
218
+ withDropdown: false, // 插入表格前是否弹出下拉菜单
219
+ columnResizable: false, // 是否允许拖动调整列宽, 默认false
220
+ exportAttrString: 'style="border: 1"' // 指定输出HTML时附加到table标签上的属性字符串
221
+ };
222
+ _braftEditor2['default'].use((0, _table2['default'])(options)); // 表格
223
+
206
224
  _moment2['default'].locale('zh-cn');
207
225
 
208
226
  var Option = _select2['default'].Option;
@@ -527,24 +545,27 @@ var Easy3wFormPage = function (_Component) {
527
545
  });
528
546
  }
529
547
  }
530
- if (readFlag || allReadFlag) {
548
+ if ((readFlag || allReadFlag) && fieldType !== 'braftEditor') {
531
549
  // allReadFlag
532
- if (fieldType === 'braftEditor') {
533
- return _react2['default'].createElement(
534
- FormItem,
535
- (0, _extends3['default'])({
536
- label: label
537
- }, formItemLayout, formItemProps, {
538
- style: formItemStyle
539
- }),
540
- getFieldDecorator(fieldId + 'Easy3wView', {
541
- initialValue: 'easy3wView',
542
- rules: [{ required: required, message: requiredMessage || '\u8BF7\u586B\u5199' + label }]
543
- })(_react2['default'].createElement(_input2['default'], { type: 'hidden' })),
544
- _react2['default'].createElement('div', { dangerouslySetInnerHTML: { __html: itemValue.toHTML() } }),
545
- afterBtns
546
- );
547
- } else if (fieldType === 'checkBox' || fieldType === 'radio') {
550
+ // if (fieldType === 'braftEditor') {
551
+ // return (
552
+ // <FormItem
553
+ // label={label}
554
+ // {...formItemLayout}
555
+ // {...formItemProps}
556
+ // style={formItemStyle}
557
+ // >
558
+ // {getFieldDecorator(`${fieldId}Easy3wView`,
559
+ // {
560
+ // initialValue: 'easy3wView',
561
+ // rules: [{ required, message: requiredMessage || `请填写${label}` }],
562
+ // })(<Input type="hidden" />)
563
+ // }
564
+ // <div dangerouslySetInnerHTML={{ __html: itemValue.toHTML() }} />{afterBtns}
565
+ // </FormItem>
566
+ // );
567
+ // } else if (fieldType === 'checkBox' || fieldType === 'radio') {
568
+ if (fieldType === 'checkBox' || fieldType === 'radio') {
548
569
  return _react2['default'].createElement(
549
570
  FormItem,
550
571
  (0, _extends3['default'])({
@@ -1441,9 +1462,17 @@ var Easy3wFormPage = function (_Component) {
1441
1462
 
1442
1463
  return _react2['default'].createElement(_autoComplete2['default'], cmptPros);
1443
1464
  }, _this.braftEditorHandler = function (item) {
1465
+ var allReadFlag = _this.props.allReadFlag;
1466
+ var readFlag = item.readFlag;
1444
1467
  var cmptPros = item.cmptPros;
1445
1468
 
1446
- return _react2['default'].createElement(_braftEditor2['default'], cmptPros);
1469
+ cmptPros = (0, _extends3['default'])({}, cmptPros);
1470
+ // const { cmptPros } = item;
1471
+ // controls={[]}
1472
+ if (readFlag || allReadFlag || cmptPros && cmptPros.readOnly) {
1473
+ cmptPros.controls = [];
1474
+ }
1475
+ return _react2['default'].createElement(_braftEditor2['default'], (0, _extends3['default'])({ readOnly: readFlag || allReadFlag }, cmptPros));
1447
1476
  }, _this.cascaderHandler = function (item) {
1448
1477
  var cmptPros = item.cmptPros;
1449
1478
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy3wui",
3
- "version": "1.5.34",
3
+ "version": "1.5.35-beta2",
4
4
  "description": "easy3wui components for react",
5
5
  "keywords": [
6
6
  "react",
@@ -104,6 +104,7 @@
104
104
  "@hanyk/rc-viewer": "^0.0.3",
105
105
  "antd": "3.24.2",
106
106
  "braft-editor": "^2.3.8",
107
+ "braft-extensions": "^0.1.1",
107
108
  "lodash": "4.17.11",
108
109
  "react-images": "^1.0.0",
109
110
  "react-number-format": "^4.3.1",