easy3wui 1.5.34 → 1.5.35-beta1

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.
@@ -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-beta1",
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",
@@ -1,76 +0,0 @@
1
- /* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
2
- /* stylelint-disable no-duplicate-selectors */
3
- /* stylelint-disable */
4
- /* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
5
- .e3wException {
6
- display: -ms-flexbox;
7
- display: flex;
8
- -ms-flex-align: center;
9
- align-items: center;
10
- height: 100%;
11
- }
12
- .e3wException .e3wExceptionImgBlock {
13
- -ms-flex: 0 0 62.5%;
14
- flex: 0 0 62.5%;
15
- width: 62.5%;
16
- padding-right: 152px;
17
- }
18
- .e3wException .e3wExceptionImgBlock::before {
19
- display: table;
20
- content: '';
21
- }
22
- .e3wException .e3wExceptionImgBlock::after {
23
- display: table;
24
- clear: both;
25
- content: '';
26
- }
27
- .e3wException .e3wExceptionImgEle {
28
- height: 360px;
29
- width: 100%;
30
- max-width: 430px;
31
- float: right;
32
- background-repeat: no-repeat;
33
- background-position: 50% 50%;
34
- background-size: 100% 100%;
35
- }
36
- .e3wException .e3wExceptionContent {
37
- -ms-flex: auto;
38
- flex: auto;
39
- }
40
- .e3wException .e3wExceptionContent h1 {
41
- color: #434e59;
42
- font-size: 72px;
43
- font-weight: 600;
44
- line-height: 72px;
45
- margin-bottom: 24px;
46
- }
47
- .e3wException .e3wExceptionContent .e3wExceptionDesc {
48
- color: rgba(0, 0, 0, 0.45);
49
- font-size: 20px;
50
- line-height: 28px;
51
- margin-bottom: 16px;
52
- }
53
- .e3wException .e3wExceptionContent .e3wExceptionActions button:not(:last-child) {
54
- margin-right: 8px;
55
- }
56
- @media screen and (max-width: 1200px) {
57
- .exception .imgBlock {
58
- padding-right: 88px;
59
- }
60
- }
61
- @media screen and (max-width: 576px) {
62
- .exception {
63
- display: block;
64
- text-align: center;
65
- }
66
- .exception .imgBlock {
67
- padding-right: 0;
68
- margin: 0 auto 24px;
69
- }
70
- }
71
- @media screen and (max-width: 480px) {
72
- .exception .imgBlock {
73
- margin-bottom: -24px;
74
- overflow: hidden;
75
- }
76
- }