@fonixtree/magic-design 2.0.127 → 2.0.128

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.
@@ -135,8 +135,13 @@ function (_super) {
135
135
 
136
136
  var promotions = (0, _businessUtil.getPromotionList)(data);
137
137
  var price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
138
- price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.specialPrice) : (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
139
- var oldPrice = data.specialPrice !== null && data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null; // const discount = Number(data.discountPercent) || 0;
138
+ var oldPrice = null;
139
+
140
+ if (data.specialPrice !== null) {
141
+ price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.specialPrice);
142
+ oldPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
143
+ } // const discount = Number(data.discountPercent) || 0;
144
+
140
145
 
141
146
  var salePercent = Number(data.salePercent) / 100 || 0;
142
147
  var imgStyle = {};
@@ -25,7 +25,6 @@
25
25
  .BundleItemWrap .prodList {
26
26
  display: flex;
27
27
  align-items: center;
28
- justify-content: center;
29
28
  overflow: scroll;
30
29
  }
31
30
  .BundleItemWrap .prodList img {
@@ -53,6 +53,12 @@
53
53
  .itemWrap {
54
54
  display: flex;
55
55
  }
56
+ .itemWrap:first-child {
57
+ margin-left: auto;
58
+ }
59
+ .itemWrap:last-child {
60
+ margin-right: auto;
61
+ }
56
62
  .itemWrap .iconPlus {
57
63
  padding: 0.02rem;
58
64
  }
@@ -82,8 +82,14 @@ function (_super) {
82
82
  onItemClick = _d.onItemClick,
83
83
  rest = __rest(_d, ["data", "onItemClick"]);
84
84
 
85
- var price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrency)(data.specialPrice) : null;
86
- var oldPrice = data.salesPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice) : null;
85
+ var price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
86
+ var oldPrice = null;
87
+
88
+ if (data.specialPrice !== null) {
89
+ price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.specialPrice);
90
+ oldPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
91
+ }
92
+
87
93
  var imgLabels = ((_a = data.labels) === null || _a === void 0 ? void 0 : _a.filter(function (f) {
88
94
  return f.position !== '6' && f.position !== '7';
89
95
  })) || [];
@@ -213,9 +213,8 @@ var defaultData = [{
213
213
  url: _card["default"]
214
214
  },
215
215
  offerName: 'Product Name',
216
- salesPrice: 20000000,
217
- specialPrice: 18000000,
218
- marketPrice: 19000000,
216
+ salesPrice: 10000,
217
+ specialPrice: 800,
219
218
  discountPercent: 10,
220
219
  salePercent: 500,
221
220
  salesCnt: 501,
@@ -225,9 +224,8 @@ var defaultData = [{
225
224
  url: _card["default"]
226
225
  },
227
226
  offerName: 'Product Name',
228
- salesPrice: 20000000,
229
- specialPrice: 18000000,
230
- marketPrice: 19000000,
227
+ salesPrice: 20000,
228
+ specialPrice: null,
231
229
  discountPercent: null,
232
230
  salePercent: 500,
233
231
  salesCnt: 501,
@@ -239,7 +237,6 @@ var defaultData = [{
239
237
  offerName: 'Product Name',
240
238
  salesPrice: 20000000,
241
239
  specialPrice: 18000000,
242
- marketPrice: 19000000,
243
240
  discountPercent: 10,
244
241
  salePercent: 500,
245
242
  salesCnt: 501,
@@ -251,7 +248,6 @@ var defaultData = [{
251
248
  offerName: 'Product Name',
252
249
  salesPrice: 20000000,
253
250
  specialPrice: 18000000,
254
- marketPrice: 19000000,
255
251
  discountPercent: 10,
256
252
  salePercent: 500,
257
253
  salesCnt: 200,
@@ -135,8 +135,13 @@ function (_super) {
135
135
 
136
136
  var promotions = (0, _businessUtil.getPromotionList)(data);
137
137
  var price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
138
- price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.specialPrice) : (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
139
- var oldPrice = data.specialPrice !== null && data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null; // const discount = Number(data.discountPercent) || 0;
138
+ var oldPrice = null;
139
+
140
+ if (data.specialPrice !== null) {
141
+ price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.specialPrice);
142
+ oldPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
143
+ } // const discount = Number(data.discountPercent) || 0;
144
+
140
145
 
141
146
  var salePercent = Number(data.salePercent) / 100 || 0;
142
147
  var imgStyle = {};
@@ -25,7 +25,6 @@
25
25
  .BundleItemWrap .prodList {
26
26
  display: flex;
27
27
  align-items: center;
28
- justify-content: center;
29
28
  overflow: scroll;
30
29
  }
31
30
  .BundleItemWrap .prodList img {
@@ -53,6 +53,12 @@
53
53
  .itemWrap {
54
54
  display: flex;
55
55
  }
56
+ .itemWrap:first-child {
57
+ margin-left: auto;
58
+ }
59
+ .itemWrap:last-child {
60
+ margin-right: auto;
61
+ }
56
62
  .itemWrap .iconPlus {
57
63
  padding: 0.02rem;
58
64
  }
@@ -82,8 +82,14 @@ function (_super) {
82
82
  onItemClick = _d.onItemClick,
83
83
  rest = __rest(_d, ["data", "onItemClick"]);
84
84
 
85
- var price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrency)(data.specialPrice) : null;
86
- var oldPrice = data.salesPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice) : null;
85
+ var price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
86
+ var oldPrice = null;
87
+
88
+ if (data.specialPrice !== null) {
89
+ price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.specialPrice);
90
+ oldPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
91
+ }
92
+
87
93
  var imgLabels = ((_a = data.labels) === null || _a === void 0 ? void 0 : _a.filter(function (f) {
88
94
  return f.position !== '6' && f.position !== '7';
89
95
  })) || [];
@@ -213,9 +213,8 @@ var defaultData = [{
213
213
  url: _card["default"]
214
214
  },
215
215
  offerName: 'Product Name',
216
- salesPrice: 20000000,
217
- specialPrice: 18000000,
218
- marketPrice: 19000000,
216
+ salesPrice: 10000,
217
+ specialPrice: 800,
219
218
  discountPercent: 10,
220
219
  salePercent: 500,
221
220
  salesCnt: 501,
@@ -225,9 +224,8 @@ var defaultData = [{
225
224
  url: _card["default"]
226
225
  },
227
226
  offerName: 'Product Name',
228
- salesPrice: 20000000,
229
- specialPrice: 18000000,
230
- marketPrice: 19000000,
227
+ salesPrice: 20000,
228
+ specialPrice: null,
231
229
  discountPercent: null,
232
230
  salePercent: 500,
233
231
  salesCnt: 501,
@@ -239,7 +237,6 @@ var defaultData = [{
239
237
  offerName: 'Product Name',
240
238
  salesPrice: 20000000,
241
239
  specialPrice: 18000000,
242
- marketPrice: 19000000,
243
240
  discountPercent: 10,
244
241
  salePercent: 500,
245
242
  salesCnt: 501,
@@ -251,7 +248,6 @@ var defaultData = [{
251
248
  offerName: 'Product Name',
252
249
  salesPrice: 20000000,
253
250
  specialPrice: 18000000,
254
- marketPrice: 19000000,
255
251
  discountPercent: 10,
256
252
  salePercent: 500,
257
253
  salesCnt: 200,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "2.0.127",
4
+ "version": "2.0.128",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",