@fonixtree/magic-design 0.0.38 → 0.0.39
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/defaultJSON.js +1 -1
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +10 -4
- package/es/composite-comp/dito/components/Recommend/pc/index.js +22 -30
- package/es/constants/layout.js +6 -6
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +10 -4
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +22 -30
- package/lib/constants/layout.js +6 -6
- package/package.json +1 -1
|
@@ -565,6 +565,12 @@ function (_super) {
|
|
|
565
565
|
return groupSource[tabIndex].seeAll;
|
|
566
566
|
}, '');
|
|
567
567
|
|
|
568
|
+
var imgHeight = (0, _commonUtil.ensure)(function () {
|
|
569
|
+
return LAYOUT_IMAGE_SIZE[layout].h;
|
|
570
|
+
}, 140);
|
|
571
|
+
var imgWidth = (0, _commonUtil.ensure)(function () {
|
|
572
|
+
return LAYOUT_IMAGE_SIZE[layout].w;
|
|
573
|
+
}, 140);
|
|
568
574
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
569
575
|
className: "m-recommend-mobile",
|
|
570
576
|
style: bgStyle
|
|
@@ -613,8 +619,8 @@ function (_super) {
|
|
|
613
619
|
key: item.productId,
|
|
614
620
|
data: item,
|
|
615
621
|
fixHeight: layout === 'layout3',
|
|
616
|
-
imgHeight:
|
|
617
|
-
imgWidth:
|
|
622
|
+
imgHeight: imgHeight,
|
|
623
|
+
imgWidth: imgWidth,
|
|
618
624
|
layout: layout === 'layout2' ? 'horizontal' : 'vertical',
|
|
619
625
|
onItemClick: function onItemClick() {
|
|
620
626
|
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
@@ -637,8 +643,8 @@ function (_super) {
|
|
|
637
643
|
key: "scroll_" + item.productId,
|
|
638
644
|
data: item,
|
|
639
645
|
fixHeight: true,
|
|
640
|
-
imgHeight:
|
|
641
|
-
imgWidth:
|
|
646
|
+
imgHeight: imgHeight,
|
|
647
|
+
imgWidth: imgWidth,
|
|
642
648
|
onItemClick: function onItemClick() {
|
|
643
649
|
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
644
650
|
},
|
|
@@ -228,24 +228,16 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
228
228
|
|
|
229
229
|
var LAYOUT_IMAGE_SIZE = {
|
|
230
230
|
layout1: {
|
|
231
|
-
w:
|
|
232
|
-
h:
|
|
231
|
+
w: 180,
|
|
232
|
+
h: 180
|
|
233
233
|
},
|
|
234
234
|
layout2: {
|
|
235
|
-
w:
|
|
236
|
-
h:
|
|
235
|
+
w: 160,
|
|
236
|
+
h: 160
|
|
237
237
|
},
|
|
238
238
|
layout3: {
|
|
239
|
-
w:
|
|
240
|
-
h:
|
|
241
|
-
},
|
|
242
|
-
layout4: {
|
|
243
|
-
w: 96,
|
|
244
|
-
h: 96
|
|
245
|
-
},
|
|
246
|
-
layout5: {
|
|
247
|
-
w: 110,
|
|
248
|
-
h: 110
|
|
239
|
+
w: 180,
|
|
240
|
+
h: 180
|
|
249
241
|
}
|
|
250
242
|
};
|
|
251
243
|
|
|
@@ -412,16 +404,11 @@ function (_super) {
|
|
|
412
404
|
};
|
|
413
405
|
|
|
414
406
|
_this.resetLayout = function () {
|
|
415
|
-
var
|
|
416
|
-
|
|
417
|
-
layout1: 2,
|
|
418
|
-
layout2: 1,
|
|
419
|
-
layout3: 3
|
|
420
|
-
};
|
|
421
|
-
if (!LAYOUT_COLUMN[layout]) return;
|
|
407
|
+
var customize = _this.props.panelProps.customize;
|
|
408
|
+
if (customize.layout.pcLayout !== 'layout1') return;
|
|
422
409
|
setTimeout(function () {
|
|
423
410
|
if (document.querySelector('.macyContainer')) {
|
|
424
|
-
_this.getMacy('.macyContainer',
|
|
411
|
+
_this.getMacy('.macyContainer', customize.pcRowNum);
|
|
425
412
|
}
|
|
426
413
|
});
|
|
427
414
|
};
|
|
@@ -565,6 +552,12 @@ function (_super) {
|
|
|
565
552
|
return groupSource[tabIndex].seeAll;
|
|
566
553
|
}, '');
|
|
567
554
|
|
|
555
|
+
var imgHeight = (0, _commonUtil.ensure)(function () {
|
|
556
|
+
return LAYOUT_IMAGE_SIZE[layout].h;
|
|
557
|
+
}, 140);
|
|
558
|
+
var imgWidth = (0, _commonUtil.ensure)(function () {
|
|
559
|
+
return LAYOUT_IMAGE_SIZE[layout].w;
|
|
560
|
+
}, 140);
|
|
568
561
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
569
562
|
className: "m-recommend-pc",
|
|
570
563
|
style: bgStyle
|
|
@@ -605,17 +598,16 @@ function (_super) {
|
|
|
605
598
|
transform: "translateX(" + tabLeft + "px)",
|
|
606
599
|
background: this.getTabBarActiveColor(panelProps)
|
|
607
600
|
}
|
|
608
|
-
})),
|
|
601
|
+
})), layout === 'layout1' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
609
602
|
key: "macyContainer",
|
|
610
603
|
className: "macyContainer"
|
|
611
604
|
}, products.map(function (item) {
|
|
612
605
|
return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
613
606
|
key: item.productId,
|
|
614
607
|
data: item,
|
|
615
|
-
fixHeight:
|
|
616
|
-
imgHeight:
|
|
617
|
-
imgWidth:
|
|
618
|
-
layout: layout === 'layout2' ? 'horizontal' : 'vertical',
|
|
608
|
+
fixHeight: true,
|
|
609
|
+
imgHeight: imgHeight,
|
|
610
|
+
imgWidth: imgWidth,
|
|
619
611
|
onItemClick: function onItemClick() {
|
|
620
612
|
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
621
613
|
},
|
|
@@ -628,7 +620,7 @@ function (_super) {
|
|
|
628
620
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
629
621
|
key: "scrollContainer",
|
|
630
622
|
className: (0, _classnames["default"])('scrollContainer', {
|
|
631
|
-
pl_100: layout === '
|
|
623
|
+
pl_100: layout === 'layout3'
|
|
632
624
|
})
|
|
633
625
|
}, products.map(function (item) {
|
|
634
626
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -637,8 +629,8 @@ function (_super) {
|
|
|
637
629
|
key: "scroll_" + item.productId,
|
|
638
630
|
data: item,
|
|
639
631
|
fixHeight: true,
|
|
640
|
-
imgHeight:
|
|
641
|
-
imgWidth:
|
|
632
|
+
imgHeight: imgHeight,
|
|
633
|
+
imgWidth: imgWidth,
|
|
642
634
|
onItemClick: function onItemClick() {
|
|
643
635
|
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
644
636
|
},
|
package/es/constants/layout.js
CHANGED
|
@@ -155,16 +155,16 @@ var recommendLayoutMobile = [{
|
|
|
155
155
|
}];
|
|
156
156
|
exports.recommendLayoutMobile = recommendLayoutMobile;
|
|
157
157
|
var recommendLayoutPc = [{
|
|
158
|
-
id: '
|
|
159
|
-
name: '
|
|
158
|
+
id: 'layout1',
|
|
159
|
+
name: 'layout1',
|
|
160
160
|
image: _layoutRecommend3["default"]
|
|
161
161
|
}, {
|
|
162
|
-
id: '
|
|
163
|
-
name: '
|
|
162
|
+
id: 'layout2',
|
|
163
|
+
name: 'layout2',
|
|
164
164
|
image: _layoutRecommend4["default"]
|
|
165
165
|
}, {
|
|
166
|
-
id: '
|
|
167
|
-
name: '
|
|
166
|
+
id: 'layout3',
|
|
167
|
+
name: 'layout3',
|
|
168
168
|
image: _layoutRecommend5["default"]
|
|
169
169
|
}];
|
|
170
170
|
exports.recommendLayoutPc = recommendLayoutPc;
|
|
@@ -565,6 +565,12 @@ function (_super) {
|
|
|
565
565
|
return groupSource[tabIndex].seeAll;
|
|
566
566
|
}, '');
|
|
567
567
|
|
|
568
|
+
var imgHeight = (0, _commonUtil.ensure)(function () {
|
|
569
|
+
return LAYOUT_IMAGE_SIZE[layout].h;
|
|
570
|
+
}, 140);
|
|
571
|
+
var imgWidth = (0, _commonUtil.ensure)(function () {
|
|
572
|
+
return LAYOUT_IMAGE_SIZE[layout].w;
|
|
573
|
+
}, 140);
|
|
568
574
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
569
575
|
className: "m-recommend-mobile",
|
|
570
576
|
style: bgStyle
|
|
@@ -613,8 +619,8 @@ function (_super) {
|
|
|
613
619
|
key: item.productId,
|
|
614
620
|
data: item,
|
|
615
621
|
fixHeight: layout === 'layout3',
|
|
616
|
-
imgHeight:
|
|
617
|
-
imgWidth:
|
|
622
|
+
imgHeight: imgHeight,
|
|
623
|
+
imgWidth: imgWidth,
|
|
618
624
|
layout: layout === 'layout2' ? 'horizontal' : 'vertical',
|
|
619
625
|
onItemClick: function onItemClick() {
|
|
620
626
|
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
@@ -637,8 +643,8 @@ function (_super) {
|
|
|
637
643
|
key: "scroll_" + item.productId,
|
|
638
644
|
data: item,
|
|
639
645
|
fixHeight: true,
|
|
640
|
-
imgHeight:
|
|
641
|
-
imgWidth:
|
|
646
|
+
imgHeight: imgHeight,
|
|
647
|
+
imgWidth: imgWidth,
|
|
642
648
|
onItemClick: function onItemClick() {
|
|
643
649
|
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
644
650
|
},
|
|
@@ -228,24 +228,16 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
228
228
|
|
|
229
229
|
var LAYOUT_IMAGE_SIZE = {
|
|
230
230
|
layout1: {
|
|
231
|
-
w:
|
|
232
|
-
h:
|
|
231
|
+
w: 180,
|
|
232
|
+
h: 180
|
|
233
233
|
},
|
|
234
234
|
layout2: {
|
|
235
|
-
w:
|
|
236
|
-
h:
|
|
235
|
+
w: 160,
|
|
236
|
+
h: 160
|
|
237
237
|
},
|
|
238
238
|
layout3: {
|
|
239
|
-
w:
|
|
240
|
-
h:
|
|
241
|
-
},
|
|
242
|
-
layout4: {
|
|
243
|
-
w: 96,
|
|
244
|
-
h: 96
|
|
245
|
-
},
|
|
246
|
-
layout5: {
|
|
247
|
-
w: 110,
|
|
248
|
-
h: 110
|
|
239
|
+
w: 180,
|
|
240
|
+
h: 180
|
|
249
241
|
}
|
|
250
242
|
};
|
|
251
243
|
|
|
@@ -412,16 +404,11 @@ function (_super) {
|
|
|
412
404
|
};
|
|
413
405
|
|
|
414
406
|
_this.resetLayout = function () {
|
|
415
|
-
var
|
|
416
|
-
|
|
417
|
-
layout1: 2,
|
|
418
|
-
layout2: 1,
|
|
419
|
-
layout3: 3
|
|
420
|
-
};
|
|
421
|
-
if (!LAYOUT_COLUMN[layout]) return;
|
|
407
|
+
var customize = _this.props.panelProps.customize;
|
|
408
|
+
if (customize.layout.pcLayout !== 'layout1') return;
|
|
422
409
|
setTimeout(function () {
|
|
423
410
|
if (document.querySelector('.macyContainer')) {
|
|
424
|
-
_this.getMacy('.macyContainer',
|
|
411
|
+
_this.getMacy('.macyContainer', customize.pcRowNum);
|
|
425
412
|
}
|
|
426
413
|
});
|
|
427
414
|
};
|
|
@@ -565,6 +552,12 @@ function (_super) {
|
|
|
565
552
|
return groupSource[tabIndex].seeAll;
|
|
566
553
|
}, '');
|
|
567
554
|
|
|
555
|
+
var imgHeight = (0, _commonUtil.ensure)(function () {
|
|
556
|
+
return LAYOUT_IMAGE_SIZE[layout].h;
|
|
557
|
+
}, 140);
|
|
558
|
+
var imgWidth = (0, _commonUtil.ensure)(function () {
|
|
559
|
+
return LAYOUT_IMAGE_SIZE[layout].w;
|
|
560
|
+
}, 140);
|
|
568
561
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
569
562
|
className: "m-recommend-pc",
|
|
570
563
|
style: bgStyle
|
|
@@ -605,17 +598,16 @@ function (_super) {
|
|
|
605
598
|
transform: "translateX(" + tabLeft + "px)",
|
|
606
599
|
background: this.getTabBarActiveColor(panelProps)
|
|
607
600
|
}
|
|
608
|
-
})),
|
|
601
|
+
})), layout === 'layout1' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
609
602
|
key: "macyContainer",
|
|
610
603
|
className: "macyContainer"
|
|
611
604
|
}, products.map(function (item) {
|
|
612
605
|
return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
613
606
|
key: item.productId,
|
|
614
607
|
data: item,
|
|
615
|
-
fixHeight:
|
|
616
|
-
imgHeight:
|
|
617
|
-
imgWidth:
|
|
618
|
-
layout: layout === 'layout2' ? 'horizontal' : 'vertical',
|
|
608
|
+
fixHeight: true,
|
|
609
|
+
imgHeight: imgHeight,
|
|
610
|
+
imgWidth: imgWidth,
|
|
619
611
|
onItemClick: function onItemClick() {
|
|
620
612
|
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
621
613
|
},
|
|
@@ -628,7 +620,7 @@ function (_super) {
|
|
|
628
620
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
629
621
|
key: "scrollContainer",
|
|
630
622
|
className: (0, _classnames["default"])('scrollContainer', {
|
|
631
|
-
pl_100: layout === '
|
|
623
|
+
pl_100: layout === 'layout3'
|
|
632
624
|
})
|
|
633
625
|
}, products.map(function (item) {
|
|
634
626
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -637,8 +629,8 @@ function (_super) {
|
|
|
637
629
|
key: "scroll_" + item.productId,
|
|
638
630
|
data: item,
|
|
639
631
|
fixHeight: true,
|
|
640
|
-
imgHeight:
|
|
641
|
-
imgWidth:
|
|
632
|
+
imgHeight: imgHeight,
|
|
633
|
+
imgWidth: imgWidth,
|
|
642
634
|
onItemClick: function onItemClick() {
|
|
643
635
|
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
644
636
|
},
|
package/lib/constants/layout.js
CHANGED
|
@@ -155,16 +155,16 @@ var recommendLayoutMobile = [{
|
|
|
155
155
|
}];
|
|
156
156
|
exports.recommendLayoutMobile = recommendLayoutMobile;
|
|
157
157
|
var recommendLayoutPc = [{
|
|
158
|
-
id: '
|
|
159
|
-
name: '
|
|
158
|
+
id: 'layout1',
|
|
159
|
+
name: 'layout1',
|
|
160
160
|
image: _layoutRecommend3["default"]
|
|
161
161
|
}, {
|
|
162
|
-
id: '
|
|
163
|
-
name: '
|
|
162
|
+
id: 'layout2',
|
|
163
|
+
name: 'layout2',
|
|
164
164
|
image: _layoutRecommend4["default"]
|
|
165
165
|
}, {
|
|
166
|
-
id: '
|
|
167
|
-
name: '
|
|
166
|
+
id: 'layout3',
|
|
167
|
+
name: 'layout3',
|
|
168
168
|
image: _layoutRecommend5["default"]
|
|
169
169
|
}];
|
|
170
170
|
exports.recommendLayoutPc = recommendLayoutPc;
|