@fonixtree/magic-design 2.0.32 → 2.0.33

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.
@@ -202,11 +202,13 @@ function (_super) {
202
202
  text: _price
203
203
  }),
204
204
  readonly: true
205
- }), oldPrice && panelProps.salesPrice.open && /*#__PURE__*/_react["default"].createElement("div", {
205
+ }), panelProps.salesPrice.open && /*#__PURE__*/_react["default"].createElement("div", {
206
+ className: "price-sold-wrap"
207
+ }, /*#__PURE__*/_react["default"].createElement("div", {
206
208
  className: "old-price-wrap"
207
209
  }, !!discount && /*#__PURE__*/_react["default"].createElement("span", {
208
210
  className: "discount"
209
- }, "-", discount, "%"), /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
211
+ }, "-", discount, "%"), oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
210
212
  className: "old-price",
211
213
  data: __assign(__assign({}, panelProps.salesPrice), {
212
214
  text: oldPrice
@@ -215,7 +217,9 @@ function (_super) {
215
217
  style: {
216
218
  color: panelProps.salesPrice.content.color
217
219
  }
218
- })), showProgress && panelProps.salesProgressVisible.open && /*#__PURE__*/_react["default"].createElement("div", {
220
+ })), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
221
+ className: "sold-count"
222
+ }, (0, _commonUtil.convertCount)(data.salesCnt), " sold")), showProgress && panelProps.salesProgressVisible.open && /*#__PURE__*/_react["default"].createElement("div", {
219
223
  className: "progress-wrap"
220
224
  }, /*#__PURE__*/_react["default"].createElement("span", {
221
225
  className: "text"
@@ -226,9 +230,7 @@ function (_super) {
226
230
  style: {
227
231
  width: salePercent + "%"
228
232
  }
229
- }))), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
230
- className: "sold-count"
231
- }, (0, _commonUtil.convertCount)(data.salesCnt), " sold")));
233
+ })))));
232
234
  };
233
235
 
234
236
  ProductItem.defaultProps = {
@@ -7,13 +7,7 @@
7
7
  cursor: pointer;
8
8
  position: relative;
9
9
 
10
- .sold-count {
11
- color: #7b7b7b;
12
- font-size: 12px;
13
- position: absolute;
14
- right: 8px;
15
- bottom: 8px;
16
- }
10
+
17
11
 
18
12
  .img-wrap {
19
13
  position: relative;
@@ -59,28 +53,40 @@
59
53
  text-overflow: ellipsis;
60
54
  }
61
55
 
62
- .old-price-wrap {
56
+ .price-sold-wrap {
63
57
  display: flex;
64
58
  margin-top: 0px;
65
- align-items: baseline;
59
+ align-items: center;
66
60
  white-space: nowrap;
67
61
  overflow: hidden;
68
62
  text-overflow: ellipsis;
69
-
70
- .discount {
71
- margin-right: 3px;
72
- font-family: 'Montserrat';
73
- font-style: normal;
74
- font-weight: 700;
75
- font-size: 8px;
76
- line-height: 15px;
77
- color: #fff;
78
- padding: 0 4px;
79
- background-color: #CE1126;
63
+ flex-wrap: wrap;
64
+ line-height: 15px;
65
+ .old-price-wrap {
66
+ display: flex;
67
+ line-height: 13px;
68
+ .discount {
69
+ margin-right: 3px;
70
+ font-family: 'Montserrat';
71
+ font-style: normal;
72
+ font-weight: 700;
73
+ font-size: 8px;
74
+ line-height: 15px;
75
+ color: #fff;
76
+ padding: 0 4px;
77
+ background-color: #CE1126;
78
+ }
79
+ .old-price {
80
+ text-decoration: line-through;
81
+ width: fit-content;
82
+ }
80
83
  }
81
84
 
82
- .old-price {
83
- text-decoration: line-through;
85
+ .sold-count {
86
+ color: #7b7b7b;
87
+ font-size: 12px;
88
+ text-align: right ;
89
+ flex-grow: 1;
84
90
  }
85
91
  }
86
92
 
@@ -387,7 +387,7 @@ function (_super) {
387
387
  className: "store-info-wrap"
388
388
  }, /*#__PURE__*/_react["default"].createElement("div", {
389
389
  className: "number"
390
- }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5', " "), /*#__PURE__*/_react["default"].createElement("img", {
390
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5。0', " "), /*#__PURE__*/_react["default"].createElement("img", {
391
391
  alt: "star",
392
392
  src: _star["default"]
393
393
  })), /*#__PURE__*/_react["default"].createElement("div", {
@@ -57,7 +57,7 @@ function (_super) {
57
57
  };
58
58
 
59
59
  LeftTitle.defaultProps = {
60
- title: '邮件模板'
60
+ title: 'Email Template'
61
61
  };
62
62
  return LeftTitle;
63
63
  }(_react["default"].Component);
@@ -78,18 +78,9 @@ var Renderer = function Renderer(props) {
78
78
  };
79
79
 
80
80
  (0, _react.useEffect)(function () {
81
- // const data = await fishFetch('/h5/ga/mediaid', {}, 'GET');
82
- (0, _commonUtil.importAsync)('https://www.googletagmanager.com/gtag/js?id=G-7B9GSSLVX3', 'js').then(function () {
83
- window.dataLayer = window.dataLayer || [];
84
-
85
- function gtag() {
86
- dataLayer.push(arguments);
87
- }
88
-
89
- gtag('js', new Date());
90
- gtag('config', 'G-7B9GSSLVX3');
91
- window.gtag = gtag;
92
- });
81
+ console.log('----pageData change', pageData);
82
+ }, [pageData]);
83
+ (0, _react.useEffect)(function () {
93
84
  setTimeout(function () {
94
85
  var _a;
95
86
 
@@ -103,6 +94,7 @@ var Renderer = function Renderer(props) {
103
94
  className: "render_wrap",
104
95
  magic_design: "",
105
96
  style: {
97
+ height: '100%',
106
98
  background: pageBackground,
107
99
  overflow: 'auto'
108
100
  }
@@ -202,11 +202,13 @@ function (_super) {
202
202
  text: _price
203
203
  }),
204
204
  readonly: true
205
- }), oldPrice && panelProps.salesPrice.open && /*#__PURE__*/_react["default"].createElement("div", {
205
+ }), panelProps.salesPrice.open && /*#__PURE__*/_react["default"].createElement("div", {
206
+ className: "price-sold-wrap"
207
+ }, /*#__PURE__*/_react["default"].createElement("div", {
206
208
  className: "old-price-wrap"
207
209
  }, !!discount && /*#__PURE__*/_react["default"].createElement("span", {
208
210
  className: "discount"
209
- }, "-", discount, "%"), /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
211
+ }, "-", discount, "%"), oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
210
212
  className: "old-price",
211
213
  data: __assign(__assign({}, panelProps.salesPrice), {
212
214
  text: oldPrice
@@ -215,7 +217,9 @@ function (_super) {
215
217
  style: {
216
218
  color: panelProps.salesPrice.content.color
217
219
  }
218
- })), showProgress && panelProps.salesProgressVisible.open && /*#__PURE__*/_react["default"].createElement("div", {
220
+ })), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
221
+ className: "sold-count"
222
+ }, (0, _commonUtil.convertCount)(data.salesCnt), " sold")), showProgress && panelProps.salesProgressVisible.open && /*#__PURE__*/_react["default"].createElement("div", {
219
223
  className: "progress-wrap"
220
224
  }, /*#__PURE__*/_react["default"].createElement("span", {
221
225
  className: "text"
@@ -226,9 +230,7 @@ function (_super) {
226
230
  style: {
227
231
  width: salePercent + "%"
228
232
  }
229
- }))), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
230
- className: "sold-count"
231
- }, (0, _commonUtil.convertCount)(data.salesCnt), " sold")));
233
+ })))));
232
234
  };
233
235
 
234
236
  ProductItem.defaultProps = {
@@ -7,13 +7,7 @@
7
7
  cursor: pointer;
8
8
  position: relative;
9
9
 
10
- .sold-count {
11
- color: #7b7b7b;
12
- font-size: 12px;
13
- position: absolute;
14
- right: 8px;
15
- bottom: 8px;
16
- }
10
+
17
11
 
18
12
  .img-wrap {
19
13
  position: relative;
@@ -59,28 +53,40 @@
59
53
  text-overflow: ellipsis;
60
54
  }
61
55
 
62
- .old-price-wrap {
56
+ .price-sold-wrap {
63
57
  display: flex;
64
58
  margin-top: 0px;
65
- align-items: baseline;
59
+ align-items: center;
66
60
  white-space: nowrap;
67
61
  overflow: hidden;
68
62
  text-overflow: ellipsis;
69
-
70
- .discount {
71
- margin-right: 3px;
72
- font-family: 'Montserrat';
73
- font-style: normal;
74
- font-weight: 700;
75
- font-size: 8px;
76
- line-height: 15px;
77
- color: #fff;
78
- padding: 0 4px;
79
- background-color: #CE1126;
63
+ flex-wrap: wrap;
64
+ line-height: 15px;
65
+ .old-price-wrap {
66
+ display: flex;
67
+ line-height: 13px;
68
+ .discount {
69
+ margin-right: 3px;
70
+ font-family: 'Montserrat';
71
+ font-style: normal;
72
+ font-weight: 700;
73
+ font-size: 8px;
74
+ line-height: 15px;
75
+ color: #fff;
76
+ padding: 0 4px;
77
+ background-color: #CE1126;
78
+ }
79
+ .old-price {
80
+ text-decoration: line-through;
81
+ width: fit-content;
82
+ }
80
83
  }
81
84
 
82
- .old-price {
83
- text-decoration: line-through;
85
+ .sold-count {
86
+ color: #7b7b7b;
87
+ font-size: 12px;
88
+ text-align: right ;
89
+ flex-grow: 1;
84
90
  }
85
91
  }
86
92
 
@@ -387,7 +387,7 @@ function (_super) {
387
387
  className: "store-info-wrap"
388
388
  }, /*#__PURE__*/_react["default"].createElement("div", {
389
389
  className: "number"
390
- }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5', " "), /*#__PURE__*/_react["default"].createElement("img", {
390
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5。0', " "), /*#__PURE__*/_react["default"].createElement("img", {
391
391
  alt: "star",
392
392
  src: _star["default"]
393
393
  })), /*#__PURE__*/_react["default"].createElement("div", {
@@ -57,7 +57,7 @@ function (_super) {
57
57
  };
58
58
 
59
59
  LeftTitle.defaultProps = {
60
- title: '邮件模板'
60
+ title: 'Email Template'
61
61
  };
62
62
  return LeftTitle;
63
63
  }(_react["default"].Component);
@@ -78,18 +78,9 @@ var Renderer = function Renderer(props) {
78
78
  };
79
79
 
80
80
  (0, _react.useEffect)(function () {
81
- // const data = await fishFetch('/h5/ga/mediaid', {}, 'GET');
82
- (0, _commonUtil.importAsync)('https://www.googletagmanager.com/gtag/js?id=G-7B9GSSLVX3', 'js').then(function () {
83
- window.dataLayer = window.dataLayer || [];
84
-
85
- function gtag() {
86
- dataLayer.push(arguments);
87
- }
88
-
89
- gtag('js', new Date());
90
- gtag('config', 'G-7B9GSSLVX3');
91
- window.gtag = gtag;
92
- });
81
+ console.log('----pageData change', pageData);
82
+ }, [pageData]);
83
+ (0, _react.useEffect)(function () {
93
84
  setTimeout(function () {
94
85
  var _a;
95
86
 
@@ -103,6 +94,7 @@ var Renderer = function Renderer(props) {
103
94
  className: "render_wrap",
104
95
  magic_design: "",
105
96
  style: {
97
+ height: '100%',
106
98
  background: pageBackground,
107
99
  overflow: 'auto'
108
100
  }
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.32",
4
+ "version": "2.0.33",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",
Binary file
Binary file