@fonixtree/magic-design 2.0.182 → 2.0.185
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/MonpayProductItem/index.js +8 -4
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +2 -0
- package/lib/composite-comp/common/components/MonpayProductItem/index.js +8 -4
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +2 -0
- package/package.json +1 -1
|
@@ -134,12 +134,13 @@ function (_super) {
|
|
|
134
134
|
showProName = _h.showProName,
|
|
135
135
|
showProgress = _h.showProgress,
|
|
136
136
|
intelligentType = _h.intelligentType,
|
|
137
|
+
isRecommend = _h.isRecommend,
|
|
137
138
|
fixHeight = _h.fixHeight,
|
|
138
139
|
layout = _h.layout,
|
|
139
140
|
imgHeight = _h.imgHeight,
|
|
140
141
|
imgWidth = _h.imgWidth,
|
|
141
142
|
isWill = _h.isWill,
|
|
142
|
-
rest = __rest(_h, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "intelligentType", "fixHeight", "layout", "imgHeight", "imgWidth", "isWill"]);
|
|
143
|
+
rest = __rest(_h, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "intelligentType", "isRecommend", "fixHeight", "layout", "imgHeight", "imgWidth", "isWill"]);
|
|
143
144
|
|
|
144
145
|
var price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
|
|
145
146
|
var oldPrice = null;
|
|
@@ -163,6 +164,8 @@ function (_super) {
|
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
|
|
167
|
+
var _discountPercent = isRecommend ? data.sppDiscountPercent : data.discountPercent;
|
|
168
|
+
|
|
166
169
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
167
170
|
className: (0, _classnames["default"])('monpay-product-item-wrap', {
|
|
168
171
|
fixHeight: fixHeight,
|
|
@@ -189,10 +192,10 @@ function (_super) {
|
|
|
189
192
|
size: 18,
|
|
190
193
|
type: "icon-a-EssentionalUI"
|
|
191
194
|
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('GIFT'))), // panelProps.label?.open && data.discountPercent && !isGift && (
|
|
192
|
-
this.isSpecialPrice() && !isGift &&
|
|
195
|
+
this.isSpecialPrice() && !isGift && _discountPercent && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
193
196
|
className: "discount-tag",
|
|
194
197
|
data: __assign(__assign({}, panelProps.label), {
|
|
195
|
-
text: isWill ? (0, _locale.i18n)('COMING_SOON') :
|
|
198
|
+
text: isWill ? (0, _locale.i18n)('COMING_SOON') : _discountPercent + "% " + (0, _locale.i18n)('OFF')
|
|
196
199
|
})
|
|
197
200
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
198
201
|
className: "content-wrap"
|
|
@@ -284,7 +287,8 @@ function (_super) {
|
|
|
284
287
|
showProName: true,
|
|
285
288
|
showProgress: true,
|
|
286
289
|
fixHeight: false,
|
|
287
|
-
layout: 'vertical'
|
|
290
|
+
layout: 'vertical',
|
|
291
|
+
isRecommend: false
|
|
288
292
|
};
|
|
289
293
|
return ProductItem;
|
|
290
294
|
}(_react["default"].Component);
|
|
@@ -822,6 +822,7 @@ function (_super) {
|
|
|
822
822
|
imgHeight: imgHeight,
|
|
823
823
|
imgWidth: imgWidth,
|
|
824
824
|
intelligentType: (_a = groupSource[tabIndex]) === null || _a === void 0 ? void 0 : _a.intelligentType,
|
|
825
|
+
isRecommend: true,
|
|
825
826
|
layout: layout === 'layout2' ? 'horizontal' : 'vertical',
|
|
826
827
|
onItemClick: function onItemClick() {
|
|
827
828
|
/** PTO 定制GA */
|
|
@@ -862,6 +863,7 @@ function (_super) {
|
|
|
862
863
|
imgHeight: imgHeight,
|
|
863
864
|
imgWidth: imgWidth,
|
|
864
865
|
intelligentType: (_a = groupSource[tabIndex]) === null || _a === void 0 ? void 0 : _a.intelligentType,
|
|
866
|
+
isRecommend: true,
|
|
865
867
|
onItemClick: function onItemClick() {
|
|
866
868
|
/** PTO 定制GA */
|
|
867
869
|
if (window.magicDesign.pushGA) {
|
|
@@ -134,12 +134,13 @@ function (_super) {
|
|
|
134
134
|
showProName = _h.showProName,
|
|
135
135
|
showProgress = _h.showProgress,
|
|
136
136
|
intelligentType = _h.intelligentType,
|
|
137
|
+
isRecommend = _h.isRecommend,
|
|
137
138
|
fixHeight = _h.fixHeight,
|
|
138
139
|
layout = _h.layout,
|
|
139
140
|
imgHeight = _h.imgHeight,
|
|
140
141
|
imgWidth = _h.imgWidth,
|
|
141
142
|
isWill = _h.isWill,
|
|
142
|
-
rest = __rest(_h, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "intelligentType", "fixHeight", "layout", "imgHeight", "imgWidth", "isWill"]);
|
|
143
|
+
rest = __rest(_h, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "intelligentType", "isRecommend", "fixHeight", "layout", "imgHeight", "imgWidth", "isWill"]);
|
|
143
144
|
|
|
144
145
|
var price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
|
|
145
146
|
var oldPrice = null;
|
|
@@ -163,6 +164,8 @@ function (_super) {
|
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
|
|
167
|
+
var _discountPercent = isRecommend ? data.sppDiscountPercent : data.discountPercent;
|
|
168
|
+
|
|
166
169
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
167
170
|
className: (0, _classnames["default"])('monpay-product-item-wrap', {
|
|
168
171
|
fixHeight: fixHeight,
|
|
@@ -189,10 +192,10 @@ function (_super) {
|
|
|
189
192
|
size: 18,
|
|
190
193
|
type: "icon-a-EssentionalUI"
|
|
191
194
|
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('GIFT'))), // panelProps.label?.open && data.discountPercent && !isGift && (
|
|
192
|
-
this.isSpecialPrice() && !isGift &&
|
|
195
|
+
this.isSpecialPrice() && !isGift && _discountPercent && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
193
196
|
className: "discount-tag",
|
|
194
197
|
data: __assign(__assign({}, panelProps.label), {
|
|
195
|
-
text: isWill ? (0, _locale.i18n)('COMING_SOON') :
|
|
198
|
+
text: isWill ? (0, _locale.i18n)('COMING_SOON') : _discountPercent + "% " + (0, _locale.i18n)('OFF')
|
|
196
199
|
})
|
|
197
200
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
198
201
|
className: "content-wrap"
|
|
@@ -284,7 +287,8 @@ function (_super) {
|
|
|
284
287
|
showProName: true,
|
|
285
288
|
showProgress: true,
|
|
286
289
|
fixHeight: false,
|
|
287
|
-
layout: 'vertical'
|
|
290
|
+
layout: 'vertical',
|
|
291
|
+
isRecommend: false
|
|
288
292
|
};
|
|
289
293
|
return ProductItem;
|
|
290
294
|
}(_react["default"].Component);
|
|
@@ -822,6 +822,7 @@ function (_super) {
|
|
|
822
822
|
imgHeight: imgHeight,
|
|
823
823
|
imgWidth: imgWidth,
|
|
824
824
|
intelligentType: (_a = groupSource[tabIndex]) === null || _a === void 0 ? void 0 : _a.intelligentType,
|
|
825
|
+
isRecommend: true,
|
|
825
826
|
layout: layout === 'layout2' ? 'horizontal' : 'vertical',
|
|
826
827
|
onItemClick: function onItemClick() {
|
|
827
828
|
/** PTO 定制GA */
|
|
@@ -862,6 +863,7 @@ function (_super) {
|
|
|
862
863
|
imgHeight: imgHeight,
|
|
863
864
|
imgWidth: imgWidth,
|
|
864
865
|
intelligentType: (_a = groupSource[tabIndex]) === null || _a === void 0 ? void 0 : _a.intelligentType,
|
|
866
|
+
isRecommend: true,
|
|
865
867
|
onItemClick: function onItemClick() {
|
|
866
868
|
/** PTO 定制GA */
|
|
867
869
|
if (window.magicDesign.pushGA) {
|