@fonixtree/magic-design 0.0.170 → 0.0.171
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/es/composite-comp/dito/components/Recommend/mobile/index.js +11 -17
- package/es/meta-comp/components/Text/index.js +7 -9
- package/es/utils/commonUtil.js +1 -1
- package/es/utils/coreUtil.js +5 -6
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +11 -17
- package/lib/meta-comp/components/Text/index.js +7 -9
- package/lib/utils/commonUtil.js +1 -1
- package/lib/utils/coreUtil.js +5 -6
- package/package.json +1 -1
|
@@ -486,23 +486,17 @@ function (_super) {
|
|
|
486
486
|
return _this;
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
-
RecommendMobile.prototype.componentDidMount = function () {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}, function () {
|
|
501
|
-
_this.initTab(0);
|
|
502
|
-
|
|
503
|
-
_this.getProductList(0);
|
|
504
|
-
});
|
|
505
|
-
this.listenWidth();
|
|
489
|
+
RecommendMobile.prototype.componentDidMount = function () {// const { panelProps } = this.props;
|
|
490
|
+
// const source = [];
|
|
491
|
+
// panelProps.groupSource.map(m => {
|
|
492
|
+
// const show = m.image.open || m.groupName.open;
|
|
493
|
+
// if (show) source.push(m);
|
|
494
|
+
// });
|
|
495
|
+
// this.setState({ groupSource: source }, () => {
|
|
496
|
+
// this.initTab(0);
|
|
497
|
+
// this.getProductList(0);
|
|
498
|
+
// });
|
|
499
|
+
// this.listenWidth();
|
|
506
500
|
};
|
|
507
501
|
|
|
508
502
|
RecommendMobile.prototype.componentWillReceiveProps = function (nextProps) {
|
|
@@ -319,7 +319,8 @@ function (_super) {
|
|
|
319
319
|
node.appendChild(closeNode);
|
|
320
320
|
};
|
|
321
321
|
|
|
322
|
-
_this.renderText = function (data
|
|
322
|
+
_this.renderText = function (data) {
|
|
323
|
+
var mode = window.magicDesign.mode;
|
|
323
324
|
var outputType = _this.props.outputType || window.magicDesign.outputType;
|
|
324
325
|
if (!_this.textRef.current) return;
|
|
325
326
|
|
|
@@ -437,14 +438,14 @@ function (_super) {
|
|
|
437
438
|
Text.prototype.componentDidMount = function () {
|
|
438
439
|
var _this = this;
|
|
439
440
|
|
|
440
|
-
this.renderText(this.props.data
|
|
441
|
+
this.renderText(this.props.data);
|
|
441
442
|
initSelectionEvent();
|
|
442
443
|
appendSelectionTarget({
|
|
443
444
|
target: this.textRef.current,
|
|
444
445
|
data: this.props.data,
|
|
445
446
|
selectionRefMap: this.selectionRefMap,
|
|
446
447
|
refresh: function refresh() {
|
|
447
|
-
_this.renderText(_this.props.data
|
|
448
|
+
_this.renderText(_this.props.data);
|
|
448
449
|
}
|
|
449
450
|
});
|
|
450
451
|
};
|
|
@@ -456,7 +457,7 @@ function (_super) {
|
|
|
456
457
|
var result = should1 || should2 || should3;
|
|
457
458
|
|
|
458
459
|
if (result) {
|
|
459
|
-
this.renderText(nextProps.data
|
|
460
|
+
this.renderText(nextProps.data);
|
|
460
461
|
}
|
|
461
462
|
|
|
462
463
|
return result;
|
|
@@ -473,8 +474,8 @@ function (_super) {
|
|
|
473
474
|
data = _a.data,
|
|
474
475
|
className = _a.className,
|
|
475
476
|
readonly = _a.readonly,
|
|
476
|
-
onTextInput = _a.onTextInput
|
|
477
|
-
|
|
477
|
+
onTextInput = _a.onTextInput;
|
|
478
|
+
var mode = window.magicDesign.mode;
|
|
478
479
|
var style = contentStyle(data.content);
|
|
479
480
|
|
|
480
481
|
if (data.underline) {
|
|
@@ -498,8 +499,6 @@ function (_super) {
|
|
|
498
499
|
// textDecorationColor: data?.underline.textDecorationColor,
|
|
499
500
|
// textDecorationStyle: data?.underline.textDecorationStyle,
|
|
500
501
|
// };
|
|
501
|
-
// mode == 'designer' && !readonly
|
|
502
|
-
// console.log('!readonly: ', mode, readonly);
|
|
503
502
|
|
|
504
503
|
|
|
505
504
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -534,7 +533,6 @@ function (_super) {
|
|
|
534
533
|
|
|
535
534
|
Text.defaultProps = {
|
|
536
535
|
readonly: false,
|
|
537
|
-
mode: 'designer',
|
|
538
536
|
onTextInput: function onTextInput() {}
|
|
539
537
|
};
|
|
540
538
|
Text = __decorate([_decorator.metaDecorator], Text);
|
package/es/utils/commonUtil.js
CHANGED
package/es/utils/coreUtil.js
CHANGED
|
@@ -289,16 +289,15 @@ var getCoupon = function getCoupon(couponId) {
|
|
|
289
289
|
var clickUrl = function clickUrl(url) {
|
|
290
290
|
console.log('clickUrl...', url);
|
|
291
291
|
|
|
292
|
+
if (window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
|
|
292
296
|
var _a = (0, _businessUtil.parseUrl)(url),
|
|
293
297
|
link = _a.link,
|
|
294
298
|
data = _a.data;
|
|
295
299
|
|
|
296
|
-
var params = data.params;
|
|
297
|
-
|
|
298
|
-
if (window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
|
|
299
|
-
return;
|
|
300
|
-
} // 如果是video 放开return
|
|
301
|
-
|
|
300
|
+
var params = data.params; // 如果是video 放开return
|
|
302
301
|
|
|
303
302
|
if (params.type !== 'VIDEO' && window.magicDesign.readOnly) {
|
|
304
303
|
return;
|
|
@@ -486,23 +486,17 @@ function (_super) {
|
|
|
486
486
|
return _this;
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
-
RecommendMobile.prototype.componentDidMount = function () {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}, function () {
|
|
501
|
-
_this.initTab(0);
|
|
502
|
-
|
|
503
|
-
_this.getProductList(0);
|
|
504
|
-
});
|
|
505
|
-
this.listenWidth();
|
|
489
|
+
RecommendMobile.prototype.componentDidMount = function () {// const { panelProps } = this.props;
|
|
490
|
+
// const source = [];
|
|
491
|
+
// panelProps.groupSource.map(m => {
|
|
492
|
+
// const show = m.image.open || m.groupName.open;
|
|
493
|
+
// if (show) source.push(m);
|
|
494
|
+
// });
|
|
495
|
+
// this.setState({ groupSource: source }, () => {
|
|
496
|
+
// this.initTab(0);
|
|
497
|
+
// this.getProductList(0);
|
|
498
|
+
// });
|
|
499
|
+
// this.listenWidth();
|
|
506
500
|
};
|
|
507
501
|
|
|
508
502
|
RecommendMobile.prototype.componentWillReceiveProps = function (nextProps) {
|
|
@@ -319,7 +319,8 @@ function (_super) {
|
|
|
319
319
|
node.appendChild(closeNode);
|
|
320
320
|
};
|
|
321
321
|
|
|
322
|
-
_this.renderText = function (data
|
|
322
|
+
_this.renderText = function (data) {
|
|
323
|
+
var mode = window.magicDesign.mode;
|
|
323
324
|
var outputType = _this.props.outputType || window.magicDesign.outputType;
|
|
324
325
|
if (!_this.textRef.current) return;
|
|
325
326
|
|
|
@@ -437,14 +438,14 @@ function (_super) {
|
|
|
437
438
|
Text.prototype.componentDidMount = function () {
|
|
438
439
|
var _this = this;
|
|
439
440
|
|
|
440
|
-
this.renderText(this.props.data
|
|
441
|
+
this.renderText(this.props.data);
|
|
441
442
|
initSelectionEvent();
|
|
442
443
|
appendSelectionTarget({
|
|
443
444
|
target: this.textRef.current,
|
|
444
445
|
data: this.props.data,
|
|
445
446
|
selectionRefMap: this.selectionRefMap,
|
|
446
447
|
refresh: function refresh() {
|
|
447
|
-
_this.renderText(_this.props.data
|
|
448
|
+
_this.renderText(_this.props.data);
|
|
448
449
|
}
|
|
449
450
|
});
|
|
450
451
|
};
|
|
@@ -456,7 +457,7 @@ function (_super) {
|
|
|
456
457
|
var result = should1 || should2 || should3;
|
|
457
458
|
|
|
458
459
|
if (result) {
|
|
459
|
-
this.renderText(nextProps.data
|
|
460
|
+
this.renderText(nextProps.data);
|
|
460
461
|
}
|
|
461
462
|
|
|
462
463
|
return result;
|
|
@@ -473,8 +474,8 @@ function (_super) {
|
|
|
473
474
|
data = _a.data,
|
|
474
475
|
className = _a.className,
|
|
475
476
|
readonly = _a.readonly,
|
|
476
|
-
onTextInput = _a.onTextInput
|
|
477
|
-
|
|
477
|
+
onTextInput = _a.onTextInput;
|
|
478
|
+
var mode = window.magicDesign.mode;
|
|
478
479
|
var style = contentStyle(data.content);
|
|
479
480
|
|
|
480
481
|
if (data.underline) {
|
|
@@ -498,8 +499,6 @@ function (_super) {
|
|
|
498
499
|
// textDecorationColor: data?.underline.textDecorationColor,
|
|
499
500
|
// textDecorationStyle: data?.underline.textDecorationStyle,
|
|
500
501
|
// };
|
|
501
|
-
// mode == 'designer' && !readonly
|
|
502
|
-
// console.log('!readonly: ', mode, readonly);
|
|
503
502
|
|
|
504
503
|
|
|
505
504
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -534,7 +533,6 @@ function (_super) {
|
|
|
534
533
|
|
|
535
534
|
Text.defaultProps = {
|
|
536
535
|
readonly: false,
|
|
537
|
-
mode: 'designer',
|
|
538
536
|
onTextInput: function onTextInput() {}
|
|
539
537
|
};
|
|
540
538
|
Text = __decorate([_decorator.metaDecorator], Text);
|
package/lib/utils/commonUtil.js
CHANGED
package/lib/utils/coreUtil.js
CHANGED
|
@@ -289,16 +289,15 @@ var getCoupon = function getCoupon(couponId) {
|
|
|
289
289
|
var clickUrl = function clickUrl(url) {
|
|
290
290
|
console.log('clickUrl...', url);
|
|
291
291
|
|
|
292
|
+
if (window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
|
|
292
296
|
var _a = (0, _businessUtil.parseUrl)(url),
|
|
293
297
|
link = _a.link,
|
|
294
298
|
data = _a.data;
|
|
295
299
|
|
|
296
|
-
var params = data.params;
|
|
297
|
-
|
|
298
|
-
if (window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
|
|
299
|
-
return;
|
|
300
|
-
} // 如果是video 放开return
|
|
301
|
-
|
|
300
|
+
var params = data.params; // 如果是video 放开return
|
|
302
301
|
|
|
303
302
|
if (params.type !== 'VIDEO' && window.magicDesign.readOnly) {
|
|
304
303
|
return;
|