easy3wui 1.5.8-6.beta → 1.5.8-7.beta
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/Easy3wCard/indexM.js +19 -19
- package/lib/Easy3wCard/indexPC.js +43 -19
- package/lib/Easy3wEditBigTable/index.js +8 -11
- package/lib/Easy3wFormPage/indexM.js +19 -22
- package/lib/Easy3wFormPage/indexPC.js +20 -22
- package/lib/Easy3wGridPage/indexM.js +6 -9
- package/lib/Easy3wGridPage/indexPC.js +6 -9
- package/package.json +1 -1
package/lib/Easy3wCard/indexM.js
CHANGED
|
@@ -92,23 +92,23 @@ var Easy3wCardM = function (_Component) {
|
|
|
92
92
|
// 单个元素,检查是否是 Alert
|
|
93
93
|
var _children = children,
|
|
94
94
|
item = _children[0];
|
|
95
|
-
var
|
|
95
|
+
var props = item.props;
|
|
96
|
+
var closable = props.closable,
|
|
97
|
+
message = props.message,
|
|
98
|
+
typeA = props.type;
|
|
96
99
|
|
|
97
|
-
|
|
98
|
-
name = _ref3.name;
|
|
99
|
-
|
|
100
|
-
if (name === 'Alert') {
|
|
100
|
+
if (closable && message && typeA === 'success') {
|
|
101
101
|
children = null;
|
|
102
102
|
}
|
|
103
103
|
} else {
|
|
104
104
|
// 多个元素,查找并移除 Alert
|
|
105
105
|
var foundIndex = children.findIndex(function (item) {
|
|
106
|
-
var
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
var props = item.props;
|
|
107
|
+
var closable = props.closable,
|
|
108
|
+
message = props.message,
|
|
109
|
+
typeA = props.type;
|
|
110
110
|
|
|
111
|
-
return
|
|
111
|
+
return closable && message && typeA === 'success';
|
|
112
112
|
});
|
|
113
113
|
if (foundIndex !== -1) {
|
|
114
114
|
children.splice(foundIndex, 1);
|
|
@@ -125,10 +125,10 @@ var Easy3wCardM = function (_Component) {
|
|
|
125
125
|
var hasReqFlag = false;
|
|
126
126
|
if (label && label instanceof Object) {
|
|
127
127
|
var _label = label,
|
|
128
|
-
|
|
128
|
+
_props = _label.props;
|
|
129
129
|
|
|
130
|
-
var
|
|
131
|
-
childrenLabel =
|
|
130
|
+
var _ref3 = _props || {},
|
|
131
|
+
childrenLabel = _ref3.children;
|
|
132
132
|
|
|
133
133
|
if (childrenLabel && childrenLabel instanceof Array) {
|
|
134
134
|
// 创建 childrenLabel 的可变副本,避免修改只读的 props.children
|
|
@@ -136,12 +136,12 @@ var Easy3wCardM = function (_Component) {
|
|
|
136
136
|
var _foundIndex = childrenLabelCopy.findIndex(function (item) {
|
|
137
137
|
var propsCL = item.props;
|
|
138
138
|
|
|
139
|
-
var
|
|
140
|
-
childrenLabelC =
|
|
141
|
-
style =
|
|
139
|
+
var _ref4 = propsCL || {},
|
|
140
|
+
childrenLabelC = _ref4.children,
|
|
141
|
+
style = _ref4.style;
|
|
142
142
|
|
|
143
|
-
var
|
|
144
|
-
color =
|
|
143
|
+
var _ref5 = style || {},
|
|
144
|
+
color = _ref5.color;
|
|
145
145
|
// const { name } = type && type instanceof Object ? type : {};
|
|
146
146
|
|
|
147
147
|
|
|
@@ -154,7 +154,7 @@ var Easy3wCardM = function (_Component) {
|
|
|
154
154
|
// 移除红色星号元素
|
|
155
155
|
childrenLabelCopy.splice(_foundIndex, 1);
|
|
156
156
|
// 创建新的 label 元素,使用修改后的 children
|
|
157
|
-
label = _react2['default'].cloneElement(label, (0, _extends3['default'])({},
|
|
157
|
+
label = _react2['default'].cloneElement(label, (0, _extends3['default'])({}, _props, {
|
|
158
158
|
children: childrenLabelCopy.length === 1 ? childrenLabelCopy[0] : childrenLabelCopy
|
|
159
159
|
}));
|
|
160
160
|
}
|
|
@@ -91,23 +91,23 @@ var Easy3wCardPC = function (_Component) {
|
|
|
91
91
|
// 单个元素,检查是否是 Alert
|
|
92
92
|
var _children = children,
|
|
93
93
|
item = _children[0];
|
|
94
|
-
var
|
|
94
|
+
var props = item.props;
|
|
95
|
+
var closable = props.closable,
|
|
96
|
+
message = props.message,
|
|
97
|
+
typeA = props.type;
|
|
95
98
|
|
|
96
|
-
|
|
97
|
-
name = _ref3.name;
|
|
98
|
-
|
|
99
|
-
if (name === 'Alert') {
|
|
99
|
+
if (closable && message && typeA === 'success') {
|
|
100
100
|
children = null;
|
|
101
101
|
}
|
|
102
102
|
} else {
|
|
103
103
|
// 多个元素,查找并移除 Alert
|
|
104
104
|
var foundIndex = children.findIndex(function (item) {
|
|
105
|
-
var
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
var props = item.props;
|
|
106
|
+
var closable = props.closable,
|
|
107
|
+
message = props.message,
|
|
108
|
+
typeA = props.type;
|
|
109
109
|
|
|
110
|
-
return
|
|
110
|
+
return closable && message && typeA === 'success';
|
|
111
111
|
});
|
|
112
112
|
if (foundIndex !== -1) {
|
|
113
113
|
children.splice(foundIndex, 1);
|
|
@@ -124,10 +124,10 @@ var Easy3wCardPC = function (_Component) {
|
|
|
124
124
|
var hasReqFlag = false;
|
|
125
125
|
if (label && label instanceof Object) {
|
|
126
126
|
var _label = label,
|
|
127
|
-
|
|
127
|
+
_props = _label.props;
|
|
128
128
|
|
|
129
|
-
var
|
|
130
|
-
childrenLabel =
|
|
129
|
+
var _ref3 = _props || {},
|
|
130
|
+
childrenLabel = _ref3.children;
|
|
131
131
|
|
|
132
132
|
if (childrenLabel && childrenLabel instanceof Array) {
|
|
133
133
|
// 创建 childrenLabel 的可变副本,避免修改只读的 props.children
|
|
@@ -135,12 +135,12 @@ var Easy3wCardPC = function (_Component) {
|
|
|
135
135
|
var _foundIndex = childrenLabelCopy.findIndex(function (item) {
|
|
136
136
|
var propsCL = item.props;
|
|
137
137
|
|
|
138
|
-
var
|
|
139
|
-
childrenLabelC =
|
|
140
|
-
style =
|
|
138
|
+
var _ref4 = propsCL || {},
|
|
139
|
+
childrenLabelC = _ref4.children,
|
|
140
|
+
style = _ref4.style;
|
|
141
141
|
|
|
142
|
-
var
|
|
143
|
-
color =
|
|
142
|
+
var _ref5 = style || {},
|
|
143
|
+
color = _ref5.color;
|
|
144
144
|
// const { name } = type && type instanceof Object ? type : {};
|
|
145
145
|
|
|
146
146
|
|
|
@@ -153,7 +153,7 @@ var Easy3wCardPC = function (_Component) {
|
|
|
153
153
|
// 移除红色星号元素
|
|
154
154
|
childrenLabelCopy.splice(_foundIndex, 1);
|
|
155
155
|
// 创建新的 label 元素,使用修改后的 children
|
|
156
|
-
label = _react2['default'].cloneElement(label, (0, _extends3['default'])({},
|
|
156
|
+
label = _react2['default'].cloneElement(label, (0, _extends3['default'])({}, _props, {
|
|
157
157
|
children: childrenLabelCopy.length === 1 ? childrenLabelCopy[0] : childrenLabelCopy
|
|
158
158
|
}));
|
|
159
159
|
}
|
|
@@ -195,6 +195,7 @@ var Easy3wCardPC = function (_Component) {
|
|
|
195
195
|
bordered: false,
|
|
196
196
|
className: (0, _classnames2['default'])(['e3wCardForm']),
|
|
197
197
|
size: size || 'default'
|
|
198
|
+
// ref={this.myRef}
|
|
198
199
|
},
|
|
199
200
|
cardHelpInfo ? _react2['default'].createElement(_alert2['default'], {
|
|
200
201
|
message: cardHelpInfo,
|
|
@@ -205,6 +206,29 @@ var Easy3wCardPC = function (_Component) {
|
|
|
205
206
|
);
|
|
206
207
|
}, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret);
|
|
207
208
|
}
|
|
209
|
+
// constructor(props) {
|
|
210
|
+
// super(props);
|
|
211
|
+
// this.myRef = this.createRef();
|
|
212
|
+
// }
|
|
213
|
+
|
|
214
|
+
// componentDidUpdate() {
|
|
215
|
+
// // 使用 findDOMNode 获取 Card 组件的 DOM 节点
|
|
216
|
+
// // eslint-disable-next-line react/no-find-dom-node
|
|
217
|
+
// const cardNode = ReactDOM.findDOMNode(this.myRef.current);
|
|
218
|
+
// if (cardNode) {
|
|
219
|
+
// // 查找 Card 内部的 antd Alert 元素
|
|
220
|
+
// const alertElements = cardNode.querySelectorAll('.ant-card-body>.ant-alert');
|
|
221
|
+
// console.log('alertElements', alertElements);
|
|
222
|
+
// // 遍历并移除所有 Alert 元素
|
|
223
|
+
// // alertElements.forEach((alertElement) => {
|
|
224
|
+
// // if (alertElement.parentNode) {
|
|
225
|
+
// // console.log('alertElement.parentNode.removeChild', alertElement.parentNode.removeChild);
|
|
226
|
+
// // alertElement.parentNode.removeChild(alertElement);
|
|
227
|
+
// // }
|
|
228
|
+
// // });
|
|
229
|
+
// }
|
|
230
|
+
// }
|
|
231
|
+
|
|
208
232
|
// 根据配置重新渲染 去除原内容: 如帮助及红色*号
|
|
209
233
|
|
|
210
234
|
|
|
@@ -1098,18 +1098,15 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
1098
1098
|
var needHelpFlag = true;
|
|
1099
1099
|
if (titlec && titlec instanceof Object) {
|
|
1100
1100
|
var _titlec = titlec,
|
|
1101
|
-
titleType = _titlec.type,
|
|
1102
1101
|
props = _titlec.props;
|
|
1103
1102
|
|
|
1104
|
-
var _ref3 =
|
|
1105
|
-
|
|
1103
|
+
var _ref3 = props || {},
|
|
1104
|
+
placement = _ref3.placement,
|
|
1105
|
+
titleT = _ref3.title,
|
|
1106
|
+
children = _ref3.children,
|
|
1107
|
+
restProps = (0, _objectWithoutProperties3['default'])(_ref3, ['placement', 'title', 'children']);
|
|
1106
1108
|
|
|
1107
|
-
|
|
1108
|
-
titleT = _ref4.title,
|
|
1109
|
-
children = _ref4.children,
|
|
1110
|
-
restProps = (0, _objectWithoutProperties3['default'])(_ref4, ['title', 'children']);
|
|
1111
|
-
|
|
1112
|
-
if (name === 'Tooltip' && titleT) {
|
|
1109
|
+
if (placement && titleT && children) {
|
|
1113
1110
|
// 创建新的Tooltip组件,继承现有props,更新title
|
|
1114
1111
|
titlec = _react2['default'].createElement(
|
|
1115
1112
|
_tooltip2['default'],
|
|
@@ -1218,8 +1215,8 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
1218
1215
|
this.saveEditBigTableZJ = function () {
|
|
1219
1216
|
var objToolbarProps = _this3.props.objToolbarProps;
|
|
1220
1217
|
|
|
1221
|
-
var
|
|
1222
|
-
saveEditBigTable =
|
|
1218
|
+
var _ref4 = objToolbarProps || {},
|
|
1219
|
+
saveEditBigTable = _ref4.saveEditBigTable;
|
|
1223
1220
|
|
|
1224
1221
|
if (saveEditBigTable && typeof saveEditBigTable === 'function') {
|
|
1225
1222
|
// 数据变更-回调函数
|
|
@@ -483,18 +483,15 @@ var Easy3wFormPageM = exports.Easy3wFormPageM = function (_Component) {
|
|
|
483
483
|
var needHelpFlag = true;
|
|
484
484
|
if (label && label instanceof Object) {
|
|
485
485
|
var _label = label,
|
|
486
|
-
type = _label.type,
|
|
487
486
|
props = _label.props;
|
|
488
487
|
|
|
489
|
-
var _ref =
|
|
490
|
-
|
|
488
|
+
var _ref = props || {},
|
|
489
|
+
placement = _ref.placement,
|
|
490
|
+
title = _ref.title,
|
|
491
|
+
children = _ref.children,
|
|
492
|
+
restProps = (0, _objectWithoutProperties3['default'])(_ref, ['placement', 'title', 'children']);
|
|
491
493
|
|
|
492
|
-
|
|
493
|
-
title = _ref2.title,
|
|
494
|
-
children = _ref2.children,
|
|
495
|
-
restProps = (0, _objectWithoutProperties3['default'])(_ref2, ['title', 'children']);
|
|
496
|
-
|
|
497
|
-
if (name === 'Tooltip' && title) {
|
|
494
|
+
if (placement && title && children) {
|
|
498
495
|
// 创建新的Tooltip组件,继承现有props,更新title
|
|
499
496
|
label = _react2['default'].createElement(
|
|
500
497
|
_tooltip2['default'],
|
|
@@ -753,14 +750,14 @@ var Easy3wFormPageM = exports.Easy3wFormPageM = function (_Component) {
|
|
|
753
750
|
disableFlag = item.disableFlag,
|
|
754
751
|
numberFormat = item.numberFormat;
|
|
755
752
|
|
|
756
|
-
var
|
|
757
|
-
dataDesensitizationEyeFlag =
|
|
753
|
+
var _ref2 = globalData || {},
|
|
754
|
+
dataDesensitizationEyeFlag = _ref2.dataDesensitizationEyeFlag;
|
|
758
755
|
|
|
759
756
|
var value = item.value;
|
|
760
757
|
|
|
761
|
-
var
|
|
762
|
-
addonAfter =
|
|
763
|
-
numeralFormat =
|
|
758
|
+
var _ref3 = cmptPros || {},
|
|
759
|
+
addonAfter = _ref3.addonAfter,
|
|
760
|
+
numeralFormat = _ref3.numeralFormat;
|
|
764
761
|
// numeralFormat 新组件(金额、数字)的格式化参数
|
|
765
762
|
|
|
766
763
|
|
|
@@ -1349,18 +1346,18 @@ var Easy3wFormPageM = exports.Easy3wFormPageM = function (_Component) {
|
|
|
1349
1346
|
|
|
1350
1347
|
var threeRowItemFlag = false;
|
|
1351
1348
|
for (var _iterator = rowItemsF, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
|
1352
|
-
var
|
|
1349
|
+
var _ref4;
|
|
1353
1350
|
|
|
1354
1351
|
if (_isArray) {
|
|
1355
1352
|
if (_i >= _iterator.length) break;
|
|
1356
|
-
|
|
1353
|
+
_ref4 = _iterator[_i++];
|
|
1357
1354
|
} else {
|
|
1358
1355
|
_i = _iterator.next();
|
|
1359
1356
|
if (_i.done) break;
|
|
1360
|
-
|
|
1357
|
+
_ref4 = _i.value;
|
|
1361
1358
|
}
|
|
1362
1359
|
|
|
1363
|
-
var rItem =
|
|
1360
|
+
var rItem = _ref4;
|
|
1364
1361
|
|
|
1365
1362
|
if (rItem.cols.length === 3) {
|
|
1366
1363
|
threeRowItemFlag = true;
|
|
@@ -3262,18 +3259,18 @@ var Easy3wFormPageTightM = exports.Easy3wFormPageTightM = function (_Component2)
|
|
|
3262
3259
|
rowItems = _this2.touchTransformRowItems(rowItems);
|
|
3263
3260
|
var threeRowItemFlag = false;
|
|
3264
3261
|
for (var _iterator2 = rowItems, _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
|
3265
|
-
var
|
|
3262
|
+
var _ref5;
|
|
3266
3263
|
|
|
3267
3264
|
if (_isArray2) {
|
|
3268
3265
|
if (_i3 >= _iterator2.length) break;
|
|
3269
|
-
|
|
3266
|
+
_ref5 = _iterator2[_i3++];
|
|
3270
3267
|
} else {
|
|
3271
3268
|
_i3 = _iterator2.next();
|
|
3272
3269
|
if (_i3.done) break;
|
|
3273
|
-
|
|
3270
|
+
_ref5 = _i3.value;
|
|
3274
3271
|
}
|
|
3275
3272
|
|
|
3276
|
-
var rItem =
|
|
3273
|
+
var rItem = _ref5;
|
|
3277
3274
|
|
|
3278
3275
|
if (rItem.cols.length === 3) {
|
|
3279
3276
|
threeRowItemFlag = true;
|
|
@@ -474,18 +474,16 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
|
|
|
474
474
|
var needHelpFlag = true;
|
|
475
475
|
if (label && label instanceof Object) {
|
|
476
476
|
var _label = label,
|
|
477
|
-
type = _label.type,
|
|
478
477
|
props = _label.props;
|
|
478
|
+
// const { name } = type || {};
|
|
479
479
|
|
|
480
|
-
var _ref =
|
|
481
|
-
|
|
480
|
+
var _ref = props || {},
|
|
481
|
+
placement = _ref.placement,
|
|
482
|
+
title = _ref.title,
|
|
483
|
+
children = _ref.children,
|
|
484
|
+
restProps = (0, _objectWithoutProperties3['default'])(_ref, ['placement', 'title', 'children']);
|
|
482
485
|
|
|
483
|
-
|
|
484
|
-
title = _ref2.title,
|
|
485
|
-
children = _ref2.children,
|
|
486
|
-
restProps = (0, _objectWithoutProperties3['default'])(_ref2, ['title', 'children']);
|
|
487
|
-
|
|
488
|
-
if (name === 'Tooltip' && title) {
|
|
486
|
+
if (placement && title && children) {
|
|
489
487
|
// 创建新的Tooltip组件,继承现有props,更新title
|
|
490
488
|
label = _react2['default'].createElement(
|
|
491
489
|
_tooltip2['default'],
|
|
@@ -637,14 +635,14 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
|
|
|
637
635
|
disableFlag = item.disableFlag,
|
|
638
636
|
numberFormat = item.numberFormat;
|
|
639
637
|
|
|
640
|
-
var
|
|
641
|
-
dataDesensitizationEyeFlag =
|
|
638
|
+
var _ref2 = globalData || {},
|
|
639
|
+
dataDesensitizationEyeFlag = _ref2.dataDesensitizationEyeFlag;
|
|
642
640
|
|
|
643
641
|
var value = item.value;
|
|
644
642
|
|
|
645
|
-
var
|
|
646
|
-
addonAfter =
|
|
647
|
-
numeralFormat =
|
|
643
|
+
var _ref3 = cmptPros || {},
|
|
644
|
+
addonAfter = _ref3.addonAfter,
|
|
645
|
+
numeralFormat = _ref3.numeralFormat;
|
|
648
646
|
// numeralFormat 新组件(金额、数字)的格式化参数
|
|
649
647
|
|
|
650
648
|
|
|
@@ -1230,18 +1228,18 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
|
|
|
1230
1228
|
|
|
1231
1229
|
var threeRowItemFlag = false;
|
|
1232
1230
|
for (var _iterator = rowItemsF, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
|
1233
|
-
var
|
|
1231
|
+
var _ref4;
|
|
1234
1232
|
|
|
1235
1233
|
if (_isArray) {
|
|
1236
1234
|
if (_i >= _iterator.length) break;
|
|
1237
|
-
|
|
1235
|
+
_ref4 = _iterator[_i++];
|
|
1238
1236
|
} else {
|
|
1239
1237
|
_i = _iterator.next();
|
|
1240
1238
|
if (_i.done) break;
|
|
1241
|
-
|
|
1239
|
+
_ref4 = _i.value;
|
|
1242
1240
|
}
|
|
1243
1241
|
|
|
1244
|
-
var rItem =
|
|
1242
|
+
var rItem = _ref4;
|
|
1245
1243
|
|
|
1246
1244
|
if (rItem.cols.length === 3) {
|
|
1247
1245
|
threeRowItemFlag = true;
|
|
@@ -2997,18 +2995,18 @@ var Easy3wFormPageTightPC = exports.Easy3wFormPageTightPC = function (_Component
|
|
|
2997
2995
|
|
|
2998
2996
|
var threeRowItemFlag = false;
|
|
2999
2997
|
for (var _iterator2 = rowItems, _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
|
3000
|
-
var
|
|
2998
|
+
var _ref5;
|
|
3001
2999
|
|
|
3002
3000
|
if (_isArray2) {
|
|
3003
3001
|
if (_i3 >= _iterator2.length) break;
|
|
3004
|
-
|
|
3002
|
+
_ref5 = _iterator2[_i3++];
|
|
3005
3003
|
} else {
|
|
3006
3004
|
_i3 = _iterator2.next();
|
|
3007
3005
|
if (_i3.done) break;
|
|
3008
|
-
|
|
3006
|
+
_ref5 = _i3.value;
|
|
3009
3007
|
}
|
|
3010
3008
|
|
|
3011
|
-
var rItem =
|
|
3009
|
+
var rItem = _ref5;
|
|
3012
3010
|
|
|
3013
3011
|
if (rItem.cols.length === 3) {
|
|
3014
3012
|
threeRowItemFlag = true;
|
|
@@ -785,18 +785,15 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
785
785
|
var needHelpFlag = true;
|
|
786
786
|
if (title && title instanceof Object) {
|
|
787
787
|
var _title = title,
|
|
788
|
-
type = _title.type,
|
|
789
788
|
props = _title.props;
|
|
790
789
|
|
|
791
|
-
var _ref2 =
|
|
792
|
-
|
|
790
|
+
var _ref2 = props || {},
|
|
791
|
+
placement = _ref2.placement,
|
|
792
|
+
titleT = _ref2.title,
|
|
793
|
+
children = _ref2.children,
|
|
794
|
+
restProps = (0, _objectWithoutProperties3['default'])(_ref2, ['placement', 'title', 'children']);
|
|
793
795
|
|
|
794
|
-
|
|
795
|
-
titleT = _ref3.title,
|
|
796
|
-
children = _ref3.children,
|
|
797
|
-
restProps = (0, _objectWithoutProperties3['default'])(_ref3, ['title', 'children']);
|
|
798
|
-
|
|
799
|
-
if (name === 'Tooltip' && titleT) {
|
|
796
|
+
if (placement && titleT && children) {
|
|
800
797
|
// 创建新的Tooltip组件,继承现有props,更新title
|
|
801
798
|
title = _react2['default'].createElement(
|
|
802
799
|
_tooltip2['default'],
|
|
@@ -758,18 +758,15 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
758
758
|
var needHelpFlag = true;
|
|
759
759
|
if (title && title instanceof Object) {
|
|
760
760
|
var _title = title,
|
|
761
|
-
type = _title.type,
|
|
762
761
|
props = _title.props;
|
|
763
762
|
|
|
764
|
-
var _ref2 =
|
|
765
|
-
|
|
763
|
+
var _ref2 = props || {},
|
|
764
|
+
placement = _ref2.placement,
|
|
765
|
+
titleT = _ref2.title,
|
|
766
|
+
children = _ref2.children,
|
|
767
|
+
restProps = (0, _objectWithoutProperties3['default'])(_ref2, ['placement', 'title', 'children']);
|
|
766
768
|
|
|
767
|
-
|
|
768
|
-
titleT = _ref3.title,
|
|
769
|
-
children = _ref3.children,
|
|
770
|
-
restProps = (0, _objectWithoutProperties3['default'])(_ref3, ['title', 'children']);
|
|
771
|
-
|
|
772
|
-
if (name === 'Tooltip' && titleT) {
|
|
769
|
+
if (placement && titleT && children) {
|
|
773
770
|
// 创建新的Tooltip组件,继承现有props,更新title
|
|
774
771
|
title = _react2['default'].createElement(
|
|
775
772
|
_tooltip2['default'],
|