@fonixtree/magic-design 1.0.202 → 1.0.203
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/common/components/ProductItem/index.js +41 -5
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +2 -1
- package/lib/composite-comp/common/components/ProductItem/index.js +41 -5
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +2 -1
- package/package.json +1 -1
|
@@ -121,7 +121,8 @@ function (_super) {
|
|
|
121
121
|
imgHeight = _h.imgHeight,
|
|
122
122
|
imgWidth = _h.imgWidth,
|
|
123
123
|
unknownPrice = _h.unknownPrice,
|
|
124
|
-
|
|
124
|
+
hideLabels = _h.hideLabels,
|
|
125
|
+
rest = __rest(_h, ["data", "type", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice", "hideLabels"]);
|
|
125
126
|
|
|
126
127
|
var promotions = (0, _businessUtil.getPromotionList)(data);
|
|
127
128
|
var price = (0, _currencyUtil.formatCurrency)(data.salesPrice);
|
|
@@ -156,7 +157,42 @@ function (_super) {
|
|
|
156
157
|
var salePercent = Number(data.salePercent) / 100 || 0;
|
|
157
158
|
var imgStyle = {};
|
|
158
159
|
if (imgWidth) imgStyle.width = imgWidth;
|
|
159
|
-
if (imgHeight) imgStyle.height = imgHeight;
|
|
160
|
+
if (imgHeight) imgStyle.height = imgHeight; // data.labels = [
|
|
161
|
+
// {
|
|
162
|
+
// labelId: 118,
|
|
163
|
+
// labelClass: '1',
|
|
164
|
+
// labelName: 'label01',
|
|
165
|
+
// position: '1',
|
|
166
|
+
// imgUrl: '/get/resource/store0/conf/20250819/picture/label011957627063377092608_600.png',
|
|
167
|
+
// labelType: 'A',
|
|
168
|
+
// labelCode: null,
|
|
169
|
+
// effDate: '2025-08-18 00:00:00',
|
|
170
|
+
// expDate: '2025-10-31 23:59:59',
|
|
171
|
+
// },
|
|
172
|
+
// {
|
|
173
|
+
// labelId: 118,
|
|
174
|
+
// labelClass: '1',
|
|
175
|
+
// labelName: 'label01',
|
|
176
|
+
// position: '6',
|
|
177
|
+
// imgUrl: '/get/resource/store0/conf/20250819/picture/label011957627063377092608_600.png',
|
|
178
|
+
// labelType: 'A',
|
|
179
|
+
// labelCode: null,
|
|
180
|
+
// effDate: '2025-08-18 00:00:00',
|
|
181
|
+
// expDate: '2025-10-31 23:59:59',
|
|
182
|
+
// },
|
|
183
|
+
// {
|
|
184
|
+
// labelId: 118,
|
|
185
|
+
// labelClass: '1',
|
|
186
|
+
// labelName: 'label01',
|
|
187
|
+
// position: '7',
|
|
188
|
+
// imgUrl: '/get/resource/store0/conf/20250819/picture/label011957627063377092608_600.png',
|
|
189
|
+
// labelType: 'A',
|
|
190
|
+
// labelCode: null,
|
|
191
|
+
// effDate: '2025-08-18 00:00:00',
|
|
192
|
+
// expDate: '2025-10-31 23:59:59',
|
|
193
|
+
// },
|
|
194
|
+
// ];
|
|
195
|
+
|
|
160
196
|
var imgLabels = ((_a = data.labels) === null || _a === void 0 ? void 0 : _a.filter(function (f) {
|
|
161
197
|
return f.position !== '6' && f.position !== '7';
|
|
162
198
|
})) || [];
|
|
@@ -209,7 +245,7 @@ function (_super) {
|
|
|
209
245
|
lazy: true,
|
|
210
246
|
src: (0, _commonUtil.convertImageUrl)(data.productImg || data.imgUrlContent || data.productImageUrlContent),
|
|
211
247
|
style: imgStyle
|
|
212
|
-
}), /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
248
|
+
}), !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
213
249
|
labels: imgLabels,
|
|
214
250
|
small: true
|
|
215
251
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -235,7 +271,7 @@ function (_super) {
|
|
|
235
271
|
className: "product-name-wrap"
|
|
236
272
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
237
273
|
className: "box"
|
|
238
|
-
}, prodLabels.length > 0 && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
274
|
+
}, prodLabels.length > 0 && !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
239
275
|
labels: prodLabels,
|
|
240
276
|
small: true
|
|
241
277
|
}), showProName && panelProps.productName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
@@ -253,7 +289,7 @@ function (_super) {
|
|
|
253
289
|
text: _price
|
|
254
290
|
}),
|
|
255
291
|
readonly: true
|
|
256
|
-
}), priceLabels.length > 0 && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
292
|
+
}), priceLabels.length > 0 && !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
257
293
|
labels: priceLabels,
|
|
258
294
|
small: true
|
|
259
295
|
})), panelProps.salesPrice.open && (!!discount || oldPrice) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -428,7 +428,8 @@ function (_super) {
|
|
|
428
428
|
key: item.id,
|
|
429
429
|
data: __assign(__assign({}, item), {
|
|
430
430
|
salePercent: isWill ? 0 : item.salePercent
|
|
431
|
-
})
|
|
431
|
+
}),
|
|
432
|
+
hideLabels: isWill // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId ?? ''}`)}
|
|
432
433
|
,
|
|
433
434
|
layout: ((_a = panelProps.customize.layout) === null || _a === void 0 ? void 0 : _a.h5Layout) === 'layout2' ? 'horizontal' : 'vertical',
|
|
434
435
|
onItemClick: function onItemClick() {
|
|
@@ -121,7 +121,8 @@ function (_super) {
|
|
|
121
121
|
imgHeight = _h.imgHeight,
|
|
122
122
|
imgWidth = _h.imgWidth,
|
|
123
123
|
unknownPrice = _h.unknownPrice,
|
|
124
|
-
|
|
124
|
+
hideLabels = _h.hideLabels,
|
|
125
|
+
rest = __rest(_h, ["data", "type", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice", "hideLabels"]);
|
|
125
126
|
|
|
126
127
|
var promotions = (0, _businessUtil.getPromotionList)(data);
|
|
127
128
|
var price = (0, _currencyUtil.formatCurrency)(data.salesPrice);
|
|
@@ -156,7 +157,42 @@ function (_super) {
|
|
|
156
157
|
var salePercent = Number(data.salePercent) / 100 || 0;
|
|
157
158
|
var imgStyle = {};
|
|
158
159
|
if (imgWidth) imgStyle.width = imgWidth;
|
|
159
|
-
if (imgHeight) imgStyle.height = imgHeight;
|
|
160
|
+
if (imgHeight) imgStyle.height = imgHeight; // data.labels = [
|
|
161
|
+
// {
|
|
162
|
+
// labelId: 118,
|
|
163
|
+
// labelClass: '1',
|
|
164
|
+
// labelName: 'label01',
|
|
165
|
+
// position: '1',
|
|
166
|
+
// imgUrl: '/get/resource/store0/conf/20250819/picture/label011957627063377092608_600.png',
|
|
167
|
+
// labelType: 'A',
|
|
168
|
+
// labelCode: null,
|
|
169
|
+
// effDate: '2025-08-18 00:00:00',
|
|
170
|
+
// expDate: '2025-10-31 23:59:59',
|
|
171
|
+
// },
|
|
172
|
+
// {
|
|
173
|
+
// labelId: 118,
|
|
174
|
+
// labelClass: '1',
|
|
175
|
+
// labelName: 'label01',
|
|
176
|
+
// position: '6',
|
|
177
|
+
// imgUrl: '/get/resource/store0/conf/20250819/picture/label011957627063377092608_600.png',
|
|
178
|
+
// labelType: 'A',
|
|
179
|
+
// labelCode: null,
|
|
180
|
+
// effDate: '2025-08-18 00:00:00',
|
|
181
|
+
// expDate: '2025-10-31 23:59:59',
|
|
182
|
+
// },
|
|
183
|
+
// {
|
|
184
|
+
// labelId: 118,
|
|
185
|
+
// labelClass: '1',
|
|
186
|
+
// labelName: 'label01',
|
|
187
|
+
// position: '7',
|
|
188
|
+
// imgUrl: '/get/resource/store0/conf/20250819/picture/label011957627063377092608_600.png',
|
|
189
|
+
// labelType: 'A',
|
|
190
|
+
// labelCode: null,
|
|
191
|
+
// effDate: '2025-08-18 00:00:00',
|
|
192
|
+
// expDate: '2025-10-31 23:59:59',
|
|
193
|
+
// },
|
|
194
|
+
// ];
|
|
195
|
+
|
|
160
196
|
var imgLabels = ((_a = data.labels) === null || _a === void 0 ? void 0 : _a.filter(function (f) {
|
|
161
197
|
return f.position !== '6' && f.position !== '7';
|
|
162
198
|
})) || [];
|
|
@@ -209,7 +245,7 @@ function (_super) {
|
|
|
209
245
|
lazy: true,
|
|
210
246
|
src: (0, _commonUtil.convertImageUrl)(data.productImg || data.imgUrlContent || data.productImageUrlContent),
|
|
211
247
|
style: imgStyle
|
|
212
|
-
}), /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
248
|
+
}), !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
213
249
|
labels: imgLabels,
|
|
214
250
|
small: true
|
|
215
251
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -235,7 +271,7 @@ function (_super) {
|
|
|
235
271
|
className: "product-name-wrap"
|
|
236
272
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
237
273
|
className: "box"
|
|
238
|
-
}, prodLabels.length > 0 && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
274
|
+
}, prodLabels.length > 0 && !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
239
275
|
labels: prodLabels,
|
|
240
276
|
small: true
|
|
241
277
|
}), showProName && panelProps.productName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
@@ -253,7 +289,7 @@ function (_super) {
|
|
|
253
289
|
text: _price
|
|
254
290
|
}),
|
|
255
291
|
readonly: true
|
|
256
|
-
}), priceLabels.length > 0 && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
292
|
+
}), priceLabels.length > 0 && !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
257
293
|
labels: priceLabels,
|
|
258
294
|
small: true
|
|
259
295
|
})), panelProps.salesPrice.open && (!!discount || oldPrice) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -428,7 +428,8 @@ function (_super) {
|
|
|
428
428
|
key: item.id,
|
|
429
429
|
data: __assign(__assign({}, item), {
|
|
430
430
|
salePercent: isWill ? 0 : item.salePercent
|
|
431
|
-
})
|
|
431
|
+
}),
|
|
432
|
+
hideLabels: isWill // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId ?? ''}`)}
|
|
432
433
|
,
|
|
433
434
|
layout: ((_a = panelProps.customize.layout) === null || _a === void 0 ? void 0 : _a.h5Layout) === 'layout2' ? 'horizontal' : 'vertical',
|
|
434
435
|
onItemClick: function onItemClick() {
|