@fonixtree/magic-design 1.0.220 → 1.0.221

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.
Files changed (27) hide show
  1. package/es/common/PictureModal/index.js +1 -1
  2. package/es/composite-comp/common/components/ProductItem/index.js +22 -27
  3. package/es/composite-comp/dito/components/GroupedImage/defaultJSON.js +1 -1
  4. package/es/composite-comp/dito/components/GroupedImage/pc/index.less +1 -1
  5. package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +3 -1
  6. package/es/composite-comp/dito/components/Recommend/pc/index.js +26 -23
  7. package/es/composite-comp/dito/components/Recommend/pc/index.less +9 -1
  8. package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
  9. package/es/core/Renderer/index.js +0 -1
  10. package/es/meta-comp/config-panels/ButtonConfig/index.js +4 -0
  11. package/es/meta-comp/config-panels/ImageConfig/index.js +1 -1
  12. package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
  13. package/es/utils/coreUtil.js +3 -3
  14. package/lib/common/PictureModal/index.js +1 -1
  15. package/lib/composite-comp/common/components/ProductItem/index.js +22 -27
  16. package/lib/composite-comp/dito/components/GroupedImage/defaultJSON.js +1 -1
  17. package/lib/composite-comp/dito/components/GroupedImage/pc/index.less +1 -1
  18. package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +3 -1
  19. package/lib/composite-comp/dito/components/Recommend/pc/index.js +26 -23
  20. package/lib/composite-comp/dito/components/Recommend/pc/index.less +9 -1
  21. package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
  22. package/lib/core/Renderer/index.js +0 -1
  23. package/lib/meta-comp/config-panels/ButtonConfig/index.js +4 -0
  24. package/lib/meta-comp/config-panels/ImageConfig/index.js +1 -1
  25. package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
  26. package/lib/utils/coreUtil.js +3 -3
  27. package/package.json +1 -1
@@ -29,7 +29,7 @@ function PictureModal(_a) {
29
29
  draggable: false
30
30
  }), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
31
31
  className: "closeIcon",
32
- color: "#929292",
32
+ color: "#fff",
33
33
  onClick: onClose,
34
34
  size: 20,
35
35
  type: "icon-close"
@@ -107,22 +107,22 @@ function (_super) {
107
107
  };
108
108
 
109
109
  ProductItem.prototype.render = function () {
110
- var _a, _b, _c, _d, _e, _f, _g;
111
-
112
- var _h = this.props,
113
- data = _h.data,
114
- type = _h.type,
115
- panelProps = _h.panelProps,
116
- onItemClick = _h.onItemClick,
117
- showProName = _h.showProName,
118
- showProgress = _h.showProgress,
119
- fixHeight = _h.fixHeight,
120
- layout = _h.layout,
121
- imgHeight = _h.imgHeight,
122
- imgWidth = _h.imgWidth,
123
- unknownPrice = _h.unknownPrice,
124
- hideLabels = _h.hideLabels,
125
- rest = __rest(_h, ["data", "type", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice", "hideLabels"]);
110
+ var _a, _b, _c, _d, _e, _f;
111
+
112
+ var _g = this.props,
113
+ data = _g.data,
114
+ type = _g.type,
115
+ panelProps = _g.panelProps,
116
+ onItemClick = _g.onItemClick,
117
+ showProName = _g.showProName,
118
+ showProgress = _g.showProgress,
119
+ fixHeight = _g.fixHeight,
120
+ layout = _g.layout,
121
+ imgHeight = _g.imgHeight,
122
+ imgWidth = _g.imgWidth,
123
+ unknownPrice = _g.unknownPrice,
124
+ hideLabels = _g.hideLabels,
125
+ rest = __rest(_g, ["data", "type", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice", "hideLabels"]);
126
126
 
127
127
  var promotions = (0, _businessUtil.getPromotionList)(data);
128
128
  var price = (0, _currencyUtil.formatCurrency)(data.salesPrice);
@@ -198,10 +198,8 @@ function (_super) {
198
198
  })) || [];
199
199
  var prodLabels = ((_b = data.labels) === null || _b === void 0 ? void 0 : _b.filter(function (f) {
200
200
  return f.position === '6';
201
- })) || [];
202
- var priceLabels = ((_c = data.labels) === null || _c === void 0 ? void 0 : _c.filter(function (f) {
203
- return f.position === '7';
204
- })) || []; // ad 卡片
201
+ })) || []; // const priceLabels = data.labels?.filter(f => f.position === '7') || [];
202
+ // ad 卡片
205
203
 
206
204
  if (data.type === 'ad') {
207
205
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -289,14 +287,11 @@ function (_super) {
289
287
  text: _price
290
288
  }),
291
289
  readonly: true
292
- }), priceLabels.length > 0 && !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
293
- labels: priceLabels,
294
- small: true
295
290
  })), panelProps.salesPrice.open && (!!discount || oldPrice) && /*#__PURE__*/_react["default"].createElement("div", {
296
291
  className: "price-sold-wrap"
297
292
  }, /*#__PURE__*/_react["default"].createElement("div", {
298
293
  className: "old-price-wrap"
299
- }, !!discount && ((_d = panelProps.discountLabel) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
294
+ }, !!discount && ((_c = panelProps.discountLabel) === null || _c === void 0 ? void 0 : _c.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
300
295
  className: "discount",
301
296
  data: __assign(__assign({}, panelProps.discountLabel), {
302
297
  text: "-" + discount + "%"
@@ -311,9 +306,9 @@ function (_super) {
311
306
  style: {
312
307
  color: panelProps.salesPrice.content.color
313
308
  }
314
- })), type !== 'groupBuy' && !showProgress && data.salesCnt > 0 && data.displaySalesCntFlag === 'Y' && ((_e = panelProps.sold) === null || _e === void 0 ? void 0 : _e.open) && /*#__PURE__*/_react["default"].createElement("div", {
309
+ })), type !== 'groupBuy' && !showProgress && data.salesCnt > 0 && data.displaySalesCntFlag === 'Y' && ((_d = panelProps.sold) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
315
310
  className: "sold-count"
316
- }, (0, _commonUtil.convertCount)(data.salesCnt), " sold"))), showProgress && ((_f = panelProps.salesProgressVisible) === null || _f === void 0 ? void 0 : _f.open) && /*#__PURE__*/_react["default"].createElement("div", {
311
+ }, (0, _commonUtil.convertCount)(data.salesCnt), " sold"))), showProgress && ((_e = panelProps.salesProgressVisible) === null || _e === void 0 ? void 0 : _e.open) && /*#__PURE__*/_react["default"].createElement("div", {
317
312
  className: "progress-wrap"
318
313
  }, /*#__PURE__*/_react["default"].createElement("span", {
319
314
  className: "text"
@@ -323,7 +318,7 @@ function (_super) {
323
318
  className: "progress",
324
319
  style: {
325
320
  width: salePercent + "%",
326
- backgroundColor: (_g = panelProps.salesProgressVisible) === null || _g === void 0 ? void 0 : _g.color
321
+ backgroundColor: (_f = panelProps.salesProgressVisible) === null || _f === void 0 ? void 0 : _f.color
327
322
  }
328
323
  })))));
329
324
  };
@@ -93,7 +93,7 @@ var groupedImageGroupSourceJSON = function groupedImageGroupSourceJSON(parentId,
93
93
  parentId: parentId,
94
94
  image: baseImage,
95
95
  groupName: baseGroupName,
96
- title: createTextMeta(groupId, 'Group Title', '#CE1126', 16, 700),
96
+ title: createTextMeta(groupId, 'Group Title', '#CE1126', '16px', 700),
97
97
  images: [createImageMeta(groupId), createImageMeta(groupId), createImageMeta(groupId), createImageMeta(groupId)],
98
98
  hover: {
99
99
  open: true,
@@ -18,7 +18,7 @@
18
18
  align-items: center;
19
19
  gap: 16px;
20
20
  background: #ffffff;
21
- overflow: auto;
21
+ // overflow: auto;
22
22
  position: relative;
23
23
  width: fit-content;
24
24
  margin: 0 auto 15px;
@@ -4,10 +4,12 @@
4
4
  height: 100%;
5
5
  display: flex;
6
6
  justify-content: center;
7
+ max-height: 65px;
8
+
7
9
  // overflow: hidden;
8
10
  &>img {
9
11
  width: 100%;
10
- height: 100%;
12
+ // height: 100%;
11
13
  // object-fit: contain;
12
14
  transition: all .2s linear;
13
15
  vertical-align: initial;
@@ -303,14 +303,14 @@ function (_super) {
303
303
 
304
304
  _this.getProductList = function (index) {
305
305
  return __awaiter(_this, void 0, void 0, function () {
306
- var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, intelligentType, _e, intelligentValue, _f, maxProdNum, newData, res, res, e_1, _cache;
306
+ var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, prodType, _e, intelligentType, _f, intelligentValue, _g, maxProdNum, newData, params, res, res, e_1, _cache;
307
307
 
308
- var _g, _h, _j;
308
+ var _h, _j, _k;
309
309
 
310
310
  var _this = this;
311
311
 
312
- return __generator(this, function (_k) {
313
- switch (_k.label) {
312
+ return __generator(this, function (_l) {
313
+ switch (_l.label) {
314
314
  case 0:
315
315
  panelProps = this.props.panelProps;
316
316
  groupSource = this.state.groupSource;
@@ -322,7 +322,7 @@ function (_super) {
322
322
 
323
323
  if (cache) {
324
324
  if ("products" + index in cache) {
325
- this.setState((_g = {}, _g["products" + index] = cache["products" + index], _g), function () {
325
+ this.setState((_h = {}, _h["products" + index] = cache["products" + index], _h), function () {
326
326
  _this.resetLayout();
327
327
  });
328
328
  /** 如果数据未过期 */
@@ -334,12 +334,12 @@ function (_super) {
334
334
  }
335
335
  }
336
336
 
337
- _a = groupSource[index] || {}, _b = _a.sourceType, sourceType = _b === void 0 ? '' : _b, _c = _a.prodIds, prodIds = _c === void 0 ? '' : _c, _d = _a.intelligentType, intelligentType = _d === void 0 ? '' : _d, _e = _a.intelligentValue, intelligentValue = _e === void 0 ? [] : _e, _f = _a.maxProdNum, maxProdNum = _f === void 0 ? 10 : _f;
337
+ _a = groupSource[index] || {}, _b = _a.sourceType, sourceType = _b === void 0 ? '' : _b, _c = _a.prodIds, prodIds = _c === void 0 ? '' : _c, _d = _a.prodType, prodType = _d === void 0 ? '' : _d, _e = _a.intelligentType, intelligentType = _e === void 0 ? '' : _e, _f = _a.intelligentValue, intelligentValue = _f === void 0 ? [] : _f, _g = _a.maxProdNum, maxProdNum = _g === void 0 ? 10 : _g;
338
338
  newData = [];
339
- _k.label = 1;
339
+ _l.label = 1;
340
340
 
341
341
  case 1:
342
- _k.trys.push([1, 9,, 10]);
342
+ _l.trys.push([1, 9,, 10]);
343
343
 
344
344
  if (!(groupSource.length > 0)) return [3
345
345
  /*break*/
@@ -347,22 +347,25 @@ function (_super) {
347
347
  if (!(sourceType === 'select')) return [3
348
348
  /*break*/
349
349
  , 3];
350
+ if (!prodIds) return [2
351
+ /*return*/
352
+ ];
353
+ params = {
354
+ state: 'A'
355
+ };
350
356
 
351
- if (!prodIds) {
352
- return [2
353
- /*return*/
354
- ];
357
+ if (prodType === 'spu') {
358
+ params.offers = prodIds;
359
+ } else {
360
+ params.products = prodIds;
355
361
  }
356
362
 
357
363
  return [4
358
364
  /*yield*/
359
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/products', {
360
- products: prodIds,
361
- state: 'A'
362
- }, 'GET')];
365
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/products', params, 'GET')];
363
366
 
364
367
  case 2:
365
- res = _k.sent();
368
+ res = _l.sent();
366
369
  newData = __spreadArrays(res.list);
367
370
  return [3
368
371
  /*break*/
@@ -385,7 +388,7 @@ function (_super) {
385
388
  }, 'POST')];
386
389
 
387
390
  case 4:
388
- res = _k.sent();
391
+ res = _l.sent();
389
392
  newData = __spreadArrays(res.pageInfo.list);
390
393
  return [3
391
394
  /*break*/
@@ -393,7 +396,7 @@ function (_super) {
393
396
 
394
397
  case 5:
395
398
  newData = [];
396
- _k.label = 6;
399
+ _l.label = 6;
397
400
 
398
401
  case 6:
399
402
  return [3
@@ -402,7 +405,7 @@ function (_super) {
402
405
 
403
406
  case 7:
404
407
  newData = [];
405
- _k.label = 8;
408
+ _l.label = 8;
406
409
 
407
410
  case 8:
408
411
  return [3
@@ -410,7 +413,7 @@ function (_super) {
410
413
  , 10];
411
414
 
412
415
  case 9:
413
- e_1 = _k.sent();
416
+ e_1 = _l.sent();
414
417
  newData = [];
415
418
  return [3
416
419
  /*break*/
@@ -419,10 +422,10 @@ function (_super) {
419
422
  case 10:
420
423
  if (!(0, _coreUtil.isDesignMode)()) {
421
424
  _cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
422
- (0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (_h = {}, _h["products" + index] = newData, _h.endTime = Date.now() + 3 * 60 * 1000, _h)));
425
+ (0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (_j = {}, _j["products" + index] = newData, _j.endTime = Date.now() + 3 * 60 * 1000, _j)));
423
426
  }
424
427
 
425
- this.setState((_j = {}, _j["products" + index] = newData, _j), function () {
428
+ this.setState((_k = {}, _k["products" + index] = newData, _k), function () {
426
429
  _this.resetLayout();
427
430
  });
428
431
  return [2
@@ -18,7 +18,7 @@
18
18
  align-items: center;
19
19
  height: 50px;
20
20
  background: rgb(255 255 255);
21
- overflow: auto;
21
+ // overflow: auto;
22
22
  position: relative;
23
23
  width: fit-content;
24
24
  margin: 0 auto;
@@ -62,6 +62,14 @@
62
62
  .tab-list {
63
63
  width: 100%;
64
64
  }
65
+
66
+ .m-product-item-wrap {
67
+ border-radius: 8px;
68
+
69
+ .img-wrap {
70
+ border-radius: 8px 8px 0 0;
71
+ }
72
+ }
65
73
  }
66
74
 
67
75
  .arrow-icon {
@@ -71,7 +71,7 @@ function (_super) {
71
71
  value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
72
72
  data: panelProps.image,
73
73
  needClickArea: false,
74
- onlySpecificCode: "FunctionPage"
74
+ onlySpecificCode: ['CustomizedPage', 'FunctionPage']
75
75
  }),
76
76
  metaOption: panelProps.image
77
77
  }];
@@ -219,7 +219,6 @@ var Renderer = function Renderer(props) {
219
219
  };
220
220
  };
221
221
 
222
- console.log('window.magicDesign.designMode', window.magicDesign.designMode);
223
222
  return /*#__PURE__*/_react["default"].createElement("div", {
224
223
  className: "render_wrap",
225
224
  magic_design: "",
@@ -146,6 +146,10 @@ function (_super) {
146
146
  };
147
147
  }
148
148
 
149
+ if (!data.buttonText.pcFontSize) {
150
+ data.buttonText.pcFontSize = 14;
151
+ }
152
+
149
153
  var contentSetting = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
150
154
  split: true,
151
155
  title: "URL"
@@ -379,7 +379,7 @@ function (_super) {
379
379
  })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
380
380
  title: (0, _locale.i18n)('BORDER_RADIUS')
381
381
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
382
- maxVal: 30,
382
+ maxVal: 200,
383
383
  minVal: 0,
384
384
  onChange: function onChange(_a) {
385
385
  var count = _a.count;
@@ -287,7 +287,7 @@ function (_super) {
287
287
  },
288
288
  unit: "px",
289
289
  value: {
290
- count: window.magicDesign.device == 'pc' ? textData.pcFontSize : textData.fontSize
290
+ count: window.magicDesign.device == 'pc' ? textData.pcFontSize || textData.fontSize : textData.fontSize
291
291
  }
292
292
  }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
293
293
  title: ""
@@ -350,8 +350,7 @@ var createProdCardModal = function createProdCardModal(ids) {
350
350
  exports.createProdCardModal = createProdCardModal;
351
351
 
352
352
  var createPictureModal = function createPictureModal(url) {
353
- if (!url) return;
354
- document.body.classList.add('no-scroll');
353
+ if (!url) return; // document.body.classList.add('no-scroll');
355
354
 
356
355
  _mobx.frameStore.setState({
357
356
  pictureModalState: {
@@ -368,8 +367,9 @@ var clickUrl = function clickUrl(url, state) {
368
367
 
369
368
  if (url === void 0) {
370
369
  url = '';
371
- } // 只读模式,设计模式,url为空,邮箱模版
370
+ }
372
371
 
372
+ console.log('clickUrl....', url); // 只读模式,设计模式,url为空,邮箱模版
373
373
 
374
374
  if (window.magicDesign.readOnly || window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
375
375
  return;
@@ -29,7 +29,7 @@ function PictureModal(_a) {
29
29
  draggable: false
30
30
  }), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
31
31
  className: "closeIcon",
32
- color: "#929292",
32
+ color: "#fff",
33
33
  onClick: onClose,
34
34
  size: 20,
35
35
  type: "icon-close"
@@ -107,22 +107,22 @@ function (_super) {
107
107
  };
108
108
 
109
109
  ProductItem.prototype.render = function () {
110
- var _a, _b, _c, _d, _e, _f, _g;
111
-
112
- var _h = this.props,
113
- data = _h.data,
114
- type = _h.type,
115
- panelProps = _h.panelProps,
116
- onItemClick = _h.onItemClick,
117
- showProName = _h.showProName,
118
- showProgress = _h.showProgress,
119
- fixHeight = _h.fixHeight,
120
- layout = _h.layout,
121
- imgHeight = _h.imgHeight,
122
- imgWidth = _h.imgWidth,
123
- unknownPrice = _h.unknownPrice,
124
- hideLabels = _h.hideLabels,
125
- rest = __rest(_h, ["data", "type", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice", "hideLabels"]);
110
+ var _a, _b, _c, _d, _e, _f;
111
+
112
+ var _g = this.props,
113
+ data = _g.data,
114
+ type = _g.type,
115
+ panelProps = _g.panelProps,
116
+ onItemClick = _g.onItemClick,
117
+ showProName = _g.showProName,
118
+ showProgress = _g.showProgress,
119
+ fixHeight = _g.fixHeight,
120
+ layout = _g.layout,
121
+ imgHeight = _g.imgHeight,
122
+ imgWidth = _g.imgWidth,
123
+ unknownPrice = _g.unknownPrice,
124
+ hideLabels = _g.hideLabels,
125
+ rest = __rest(_g, ["data", "type", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice", "hideLabels"]);
126
126
 
127
127
  var promotions = (0, _businessUtil.getPromotionList)(data);
128
128
  var price = (0, _currencyUtil.formatCurrency)(data.salesPrice);
@@ -198,10 +198,8 @@ function (_super) {
198
198
  })) || [];
199
199
  var prodLabels = ((_b = data.labels) === null || _b === void 0 ? void 0 : _b.filter(function (f) {
200
200
  return f.position === '6';
201
- })) || [];
202
- var priceLabels = ((_c = data.labels) === null || _c === void 0 ? void 0 : _c.filter(function (f) {
203
- return f.position === '7';
204
- })) || []; // ad 卡片
201
+ })) || []; // const priceLabels = data.labels?.filter(f => f.position === '7') || [];
202
+ // ad 卡片
205
203
 
206
204
  if (data.type === 'ad') {
207
205
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -289,14 +287,11 @@ function (_super) {
289
287
  text: _price
290
288
  }),
291
289
  readonly: true
292
- }), priceLabels.length > 0 && !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
293
- labels: priceLabels,
294
- small: true
295
290
  })), panelProps.salesPrice.open && (!!discount || oldPrice) && /*#__PURE__*/_react["default"].createElement("div", {
296
291
  className: "price-sold-wrap"
297
292
  }, /*#__PURE__*/_react["default"].createElement("div", {
298
293
  className: "old-price-wrap"
299
- }, !!discount && ((_d = panelProps.discountLabel) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
294
+ }, !!discount && ((_c = panelProps.discountLabel) === null || _c === void 0 ? void 0 : _c.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
300
295
  className: "discount",
301
296
  data: __assign(__assign({}, panelProps.discountLabel), {
302
297
  text: "-" + discount + "%"
@@ -311,9 +306,9 @@ function (_super) {
311
306
  style: {
312
307
  color: panelProps.salesPrice.content.color
313
308
  }
314
- })), type !== 'groupBuy' && !showProgress && data.salesCnt > 0 && data.displaySalesCntFlag === 'Y' && ((_e = panelProps.sold) === null || _e === void 0 ? void 0 : _e.open) && /*#__PURE__*/_react["default"].createElement("div", {
309
+ })), type !== 'groupBuy' && !showProgress && data.salesCnt > 0 && data.displaySalesCntFlag === 'Y' && ((_d = panelProps.sold) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
315
310
  className: "sold-count"
316
- }, (0, _commonUtil.convertCount)(data.salesCnt), " sold"))), showProgress && ((_f = panelProps.salesProgressVisible) === null || _f === void 0 ? void 0 : _f.open) && /*#__PURE__*/_react["default"].createElement("div", {
311
+ }, (0, _commonUtil.convertCount)(data.salesCnt), " sold"))), showProgress && ((_e = panelProps.salesProgressVisible) === null || _e === void 0 ? void 0 : _e.open) && /*#__PURE__*/_react["default"].createElement("div", {
317
312
  className: "progress-wrap"
318
313
  }, /*#__PURE__*/_react["default"].createElement("span", {
319
314
  className: "text"
@@ -323,7 +318,7 @@ function (_super) {
323
318
  className: "progress",
324
319
  style: {
325
320
  width: salePercent + "%",
326
- backgroundColor: (_g = panelProps.salesProgressVisible) === null || _g === void 0 ? void 0 : _g.color
321
+ backgroundColor: (_f = panelProps.salesProgressVisible) === null || _f === void 0 ? void 0 : _f.color
327
322
  }
328
323
  })))));
329
324
  };
@@ -93,7 +93,7 @@ var groupedImageGroupSourceJSON = function groupedImageGroupSourceJSON(parentId,
93
93
  parentId: parentId,
94
94
  image: baseImage,
95
95
  groupName: baseGroupName,
96
- title: createTextMeta(groupId, 'Group Title', '#CE1126', 16, 700),
96
+ title: createTextMeta(groupId, 'Group Title', '#CE1126', '16px', 700),
97
97
  images: [createImageMeta(groupId), createImageMeta(groupId), createImageMeta(groupId), createImageMeta(groupId)],
98
98
  hover: {
99
99
  open: true,
@@ -18,7 +18,7 @@
18
18
  align-items: center;
19
19
  gap: 16px;
20
20
  background: #ffffff;
21
- overflow: auto;
21
+ // overflow: auto;
22
22
  position: relative;
23
23
  width: fit-content;
24
24
  margin: 0 auto 15px;
@@ -4,10 +4,12 @@
4
4
  height: 100%;
5
5
  display: flex;
6
6
  justify-content: center;
7
+ max-height: 65px;
8
+
7
9
  // overflow: hidden;
8
10
  &>img {
9
11
  width: 100%;
10
- height: 100%;
12
+ // height: 100%;
11
13
  // object-fit: contain;
12
14
  transition: all .2s linear;
13
15
  vertical-align: initial;
@@ -303,14 +303,14 @@ function (_super) {
303
303
 
304
304
  _this.getProductList = function (index) {
305
305
  return __awaiter(_this, void 0, void 0, function () {
306
- var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, intelligentType, _e, intelligentValue, _f, maxProdNum, newData, res, res, e_1, _cache;
306
+ var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, prodType, _e, intelligentType, _f, intelligentValue, _g, maxProdNum, newData, params, res, res, e_1, _cache;
307
307
 
308
- var _g, _h, _j;
308
+ var _h, _j, _k;
309
309
 
310
310
  var _this = this;
311
311
 
312
- return __generator(this, function (_k) {
313
- switch (_k.label) {
312
+ return __generator(this, function (_l) {
313
+ switch (_l.label) {
314
314
  case 0:
315
315
  panelProps = this.props.panelProps;
316
316
  groupSource = this.state.groupSource;
@@ -322,7 +322,7 @@ function (_super) {
322
322
 
323
323
  if (cache) {
324
324
  if ("products" + index in cache) {
325
- this.setState((_g = {}, _g["products" + index] = cache["products" + index], _g), function () {
325
+ this.setState((_h = {}, _h["products" + index] = cache["products" + index], _h), function () {
326
326
  _this.resetLayout();
327
327
  });
328
328
  /** 如果数据未过期 */
@@ -334,12 +334,12 @@ function (_super) {
334
334
  }
335
335
  }
336
336
 
337
- _a = groupSource[index] || {}, _b = _a.sourceType, sourceType = _b === void 0 ? '' : _b, _c = _a.prodIds, prodIds = _c === void 0 ? '' : _c, _d = _a.intelligentType, intelligentType = _d === void 0 ? '' : _d, _e = _a.intelligentValue, intelligentValue = _e === void 0 ? [] : _e, _f = _a.maxProdNum, maxProdNum = _f === void 0 ? 10 : _f;
337
+ _a = groupSource[index] || {}, _b = _a.sourceType, sourceType = _b === void 0 ? '' : _b, _c = _a.prodIds, prodIds = _c === void 0 ? '' : _c, _d = _a.prodType, prodType = _d === void 0 ? '' : _d, _e = _a.intelligentType, intelligentType = _e === void 0 ? '' : _e, _f = _a.intelligentValue, intelligentValue = _f === void 0 ? [] : _f, _g = _a.maxProdNum, maxProdNum = _g === void 0 ? 10 : _g;
338
338
  newData = [];
339
- _k.label = 1;
339
+ _l.label = 1;
340
340
 
341
341
  case 1:
342
- _k.trys.push([1, 9,, 10]);
342
+ _l.trys.push([1, 9,, 10]);
343
343
 
344
344
  if (!(groupSource.length > 0)) return [3
345
345
  /*break*/
@@ -347,22 +347,25 @@ function (_super) {
347
347
  if (!(sourceType === 'select')) return [3
348
348
  /*break*/
349
349
  , 3];
350
+ if (!prodIds) return [2
351
+ /*return*/
352
+ ];
353
+ params = {
354
+ state: 'A'
355
+ };
350
356
 
351
- if (!prodIds) {
352
- return [2
353
- /*return*/
354
- ];
357
+ if (prodType === 'spu') {
358
+ params.offers = prodIds;
359
+ } else {
360
+ params.products = prodIds;
355
361
  }
356
362
 
357
363
  return [4
358
364
  /*yield*/
359
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/products', {
360
- products: prodIds,
361
- state: 'A'
362
- }, 'GET')];
365
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/products', params, 'GET')];
363
366
 
364
367
  case 2:
365
- res = _k.sent();
368
+ res = _l.sent();
366
369
  newData = __spreadArrays(res.list);
367
370
  return [3
368
371
  /*break*/
@@ -385,7 +388,7 @@ function (_super) {
385
388
  }, 'POST')];
386
389
 
387
390
  case 4:
388
- res = _k.sent();
391
+ res = _l.sent();
389
392
  newData = __spreadArrays(res.pageInfo.list);
390
393
  return [3
391
394
  /*break*/
@@ -393,7 +396,7 @@ function (_super) {
393
396
 
394
397
  case 5:
395
398
  newData = [];
396
- _k.label = 6;
399
+ _l.label = 6;
397
400
 
398
401
  case 6:
399
402
  return [3
@@ -402,7 +405,7 @@ function (_super) {
402
405
 
403
406
  case 7:
404
407
  newData = [];
405
- _k.label = 8;
408
+ _l.label = 8;
406
409
 
407
410
  case 8:
408
411
  return [3
@@ -410,7 +413,7 @@ function (_super) {
410
413
  , 10];
411
414
 
412
415
  case 9:
413
- e_1 = _k.sent();
416
+ e_1 = _l.sent();
414
417
  newData = [];
415
418
  return [3
416
419
  /*break*/
@@ -419,10 +422,10 @@ function (_super) {
419
422
  case 10:
420
423
  if (!(0, _coreUtil.isDesignMode)()) {
421
424
  _cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
422
- (0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (_h = {}, _h["products" + index] = newData, _h.endTime = Date.now() + 3 * 60 * 1000, _h)));
425
+ (0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (_j = {}, _j["products" + index] = newData, _j.endTime = Date.now() + 3 * 60 * 1000, _j)));
423
426
  }
424
427
 
425
- this.setState((_j = {}, _j["products" + index] = newData, _j), function () {
428
+ this.setState((_k = {}, _k["products" + index] = newData, _k), function () {
426
429
  _this.resetLayout();
427
430
  });
428
431
  return [2
@@ -18,7 +18,7 @@
18
18
  align-items: center;
19
19
  height: 50px;
20
20
  background: rgb(255 255 255);
21
- overflow: auto;
21
+ // overflow: auto;
22
22
  position: relative;
23
23
  width: fit-content;
24
24
  margin: 0 auto;
@@ -62,6 +62,14 @@
62
62
  .tab-list {
63
63
  width: 100%;
64
64
  }
65
+
66
+ .m-product-item-wrap {
67
+ border-radius: 8px;
68
+
69
+ .img-wrap {
70
+ border-radius: 8px 8px 0 0;
71
+ }
72
+ }
65
73
  }
66
74
 
67
75
  .arrow-icon {
@@ -71,7 +71,7 @@ function (_super) {
71
71
  value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
72
72
  data: panelProps.image,
73
73
  needClickArea: false,
74
- onlySpecificCode: "FunctionPage"
74
+ onlySpecificCode: ['CustomizedPage', 'FunctionPage']
75
75
  }),
76
76
  metaOption: panelProps.image
77
77
  }];
@@ -219,7 +219,6 @@ var Renderer = function Renderer(props) {
219
219
  };
220
220
  };
221
221
 
222
- console.log('window.magicDesign.designMode', window.magicDesign.designMode);
223
222
  return /*#__PURE__*/_react["default"].createElement("div", {
224
223
  className: "render_wrap",
225
224
  magic_design: "",
@@ -146,6 +146,10 @@ function (_super) {
146
146
  };
147
147
  }
148
148
 
149
+ if (!data.buttonText.pcFontSize) {
150
+ data.buttonText.pcFontSize = 14;
151
+ }
152
+
149
153
  var contentSetting = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
150
154
  split: true,
151
155
  title: "URL"
@@ -379,7 +379,7 @@ function (_super) {
379
379
  })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
380
380
  title: (0, _locale.i18n)('BORDER_RADIUS')
381
381
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
382
- maxVal: 30,
382
+ maxVal: 200,
383
383
  minVal: 0,
384
384
  onChange: function onChange(_a) {
385
385
  var count = _a.count;
@@ -287,7 +287,7 @@ function (_super) {
287
287
  },
288
288
  unit: "px",
289
289
  value: {
290
- count: window.magicDesign.device == 'pc' ? textData.pcFontSize : textData.fontSize
290
+ count: window.magicDesign.device == 'pc' ? textData.pcFontSize || textData.fontSize : textData.fontSize
291
291
  }
292
292
  }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
293
293
  title: ""
@@ -350,8 +350,7 @@ var createProdCardModal = function createProdCardModal(ids) {
350
350
  exports.createProdCardModal = createProdCardModal;
351
351
 
352
352
  var createPictureModal = function createPictureModal(url) {
353
- if (!url) return;
354
- document.body.classList.add('no-scroll');
353
+ if (!url) return; // document.body.classList.add('no-scroll');
355
354
 
356
355
  _mobx.frameStore.setState({
357
356
  pictureModalState: {
@@ -368,8 +367,9 @@ var clickUrl = function clickUrl(url, state) {
368
367
 
369
368
  if (url === void 0) {
370
369
  url = '';
371
- } // 只读模式,设计模式,url为空,邮箱模版
370
+ }
372
371
 
372
+ console.log('clickUrl....', url); // 只读模式,设计模式,url为空,邮箱模版
373
373
 
374
374
  if (window.magicDesign.readOnly || window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
375
375
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "1.0.220",
4
+ "version": "1.0.221",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",