@fonixtree/magic-design 0.1.22 → 0.1.24

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 (67) hide show
  1. package/es/assets/less/input.less +4 -0
  2. package/es/common/Collapse/index.js +4 -0
  3. package/es/common/Collapse/index.less +3 -0
  4. package/es/common/FontStyles/index.less +2 -1
  5. package/es/common/InputNumber/index.less +5 -0
  6. package/es/common/LinkModal/MiniAppTable/index.js +250 -0
  7. package/es/common/LinkModal/index.js +6 -0
  8. package/es/composite-comp/bol/components/Banner/mobile/index.less +78 -52
  9. package/es/composite-comp/bol/components/Banner/pc/index.js +11 -3
  10. package/es/composite-comp/bol/components/Banner/pc/index.less +2 -2
  11. package/es/composite-comp/bol/components/Carousel/mobile/index.js +4 -4
  12. package/es/composite-comp/bol/components/Carousel/mobile/index.less +100 -81
  13. package/es/composite-comp/bol/components/Carousel/pc/index.js +5 -4
  14. package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +22 -15
  15. package/es/composite-comp/bol/components/ImageText/mobile/index.less +292 -233
  16. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +27 -23
  17. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +45 -38
  18. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +50 -41
  19. package/es/composite-comp/bol/components/Video/mobile/index.less +3 -2
  20. package/es/composite-comp/bol/components/Wallet/mobile/index.less +40 -27
  21. package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +12 -40
  22. package/es/composite-comp/common/config-panels/CustomizeConfig/index.less +2 -1
  23. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +97 -83
  24. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +35 -18
  25. package/es/composite-comp/dito/components/Recommend/mobile/index.less +86 -73
  26. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +52 -45
  27. package/es/constants/index.js +2 -1
  28. package/es/core/Designer/CompListPanel/CompCard/index.js +5 -1
  29. package/es/meta-comp/components/Image/index.js +1 -1
  30. package/es/meta-comp/config-panels/ButtonConfig/index.js +18 -1
  31. package/es/utils/businessUtil.js +12 -0
  32. package/es/utils/commonUtil.js +4 -0
  33. package/es/utils/coreUtil.js +0 -1
  34. package/lib/assets/less/input.less +4 -0
  35. package/lib/common/Collapse/index.js +4 -0
  36. package/lib/common/Collapse/index.less +3 -0
  37. package/lib/common/FontStyles/index.less +2 -1
  38. package/lib/common/InputNumber/index.less +5 -0
  39. package/lib/common/LinkModal/MiniAppTable/index.js +250 -0
  40. package/lib/common/LinkModal/index.js +6 -0
  41. package/lib/composite-comp/bol/components/Banner/mobile/index.less +78 -52
  42. package/lib/composite-comp/bol/components/Banner/pc/index.js +11 -3
  43. package/lib/composite-comp/bol/components/Banner/pc/index.less +2 -2
  44. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +4 -4
  45. package/lib/composite-comp/bol/components/Carousel/mobile/index.less +100 -81
  46. package/lib/composite-comp/bol/components/Carousel/pc/index.js +5 -4
  47. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +22 -15
  48. package/lib/composite-comp/bol/components/ImageText/mobile/index.less +292 -233
  49. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +27 -23
  50. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +45 -38
  51. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +50 -41
  52. package/lib/composite-comp/bol/components/Video/mobile/index.less +3 -2
  53. package/lib/composite-comp/bol/components/Wallet/mobile/index.less +40 -27
  54. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +12 -40
  55. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.less +2 -1
  56. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +97 -83
  57. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +35 -18
  58. package/lib/composite-comp/dito/components/Recommend/mobile/index.less +86 -73
  59. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +52 -45
  60. package/lib/constants/index.js +2 -1
  61. package/lib/core/Designer/CompListPanel/CompCard/index.js +5 -1
  62. package/lib/meta-comp/components/Image/index.js +1 -1
  63. package/lib/meta-comp/config-panels/ButtonConfig/index.js +18 -1
  64. package/lib/utils/businessUtil.js +12 -0
  65. package/lib/utils/commonUtil.js +4 -0
  66. package/lib/utils/coreUtil.js +0 -1
  67. package/package.json +1 -1
@@ -1,51 +1,58 @@
1
1
  .m-search-bar {
2
- height: 0.96rem;
3
- padding: 0.16rem 0;
2
+ height: 48px;
3
+ padding: 8px 0;
4
4
  display: flex;
5
5
  flex-direction: row-reverse;
6
6
  align-items: center;
7
7
  justify-content: space-between;
8
8
  width: 100%;
9
- }
10
- .m-search-bar .right {
11
- display: flex;
12
- flex: 1;
13
- margin-left: 0.3rem;
14
- align-items: center;
15
- justify-content: space-between;
16
- }
17
- .m-search-bar .right .search-input-wrap {
18
- flex: 1;
19
- background: #fff;
20
- border-radius: 0.08rem;
21
- border: 0.02rem solid #D2D9E5;
22
- padding: 0.08rem 0.24rem;
23
- height: 0.64rem;
24
- text-align: right;
25
- display: flex;
26
- justify-content: flex-end;
27
- }
28
- .m-search-bar .right .message-wrap {
29
- position: relative;
30
- margin-left: 0.2rem;
31
- }
32
- .m-search-bar .right .message-wrap .num {
33
- position: absolute;
34
- top: -0.12rem;
35
- right: -0.12rem;
36
- display: inline-block;
37
- padding: 0.02rem 0.04rem;
38
- min-width: 0.34rem;
39
- text-align: center;
40
- background-color: #CE1126;
41
- border: 0.02rem solid #fff;
42
- border-radius: 0.16rem;
43
- font-family: 'Montserrat';
44
- font-style: normal;
45
- font-weight: 600;
46
- font-size: 0.16rem;
47
- color: #FFFFFF;
48
- }
49
- .m-search-bar .logo img {
50
- width: auto;
51
- }
9
+
10
+ .right {
11
+ display: flex;
12
+ flex: 1;
13
+ margin-left: 15px;
14
+ align-items: center;
15
+ justify-content: space-between;
16
+
17
+ .search-input-wrap {
18
+ flex: 1;
19
+ background: #fff;
20
+ border-radius: 4px;
21
+ border: 1px solid #D2D9E5;
22
+ padding: 4px 12px;
23
+ height: 32px;
24
+ text-align: right;
25
+ display: flex;
26
+ justify-content: flex-end;
27
+ }
28
+
29
+ .message-wrap {
30
+ position: relative;
31
+ margin-left: 10px;
32
+
33
+ .num {
34
+ position: absolute;
35
+ top: -6px;
36
+ right: -6px;
37
+ display: inline-block;
38
+ padding: 1px 2px;
39
+ min-width: 17px;
40
+ text-align: center;
41
+ background-color: #CE1126;
42
+ border: 1px solid #fff;
43
+ border-radius: 8px;
44
+ font-family: 'Montserrat';
45
+ font-style: normal;
46
+ font-weight: 600;
47
+ font-size: 8px;
48
+ color: #FFFFFF;
49
+ }
50
+ }
51
+ }
52
+
53
+ .logo {
54
+ img {
55
+ width: auto;
56
+ }
57
+ }
58
+ }
@@ -54,7 +54,8 @@ var urlTypeMap = {
54
54
  COUPONS: 'Coupons',
55
55
  BUNDLE_CAMPAIGN: 'BundleCampaign',
56
56
  VIDEO: 'Video',
57
- SHARE_URL: 'ShareURL'
57
+ SHARE_URL: 'ShareURL',
58
+ MINI_APP: 'MiniApp'
58
59
  };
59
60
  exports.urlTypeMap = urlTypeMap;
60
61
  var respCodeMap = {
@@ -26,7 +26,11 @@ function CompCard(_a) {
26
26
  className: "compCard"
27
27
  }, /*#__PURE__*/_react["default"].createElement("div", {
28
28
  className: "comp-info"
29
- }, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
29
+ }, /*#__PURE__*/_react["default"].createElement("span", {
30
+ style: {
31
+ display: 'flex'
32
+ }
33
+ }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
30
34
  className: "comp-icon",
31
35
  type: icon || ((_b = _constants.compInfoMap[type]) === null || _b === void 0 ? void 0 : _b.icon)
32
36
  }), /*#__PURE__*/_react["default"].createElement("span", {
@@ -121,7 +121,7 @@ function (_super) {
121
121
  } else {
122
122
  if (data.content.h5ImgWidth) obj.width = data.content.h5ImgWidth * scale; // if (data.content.h5ImgHeight) obj.height = data.content.h5ImgHeight * scale;
123
123
 
124
- if (data.content.h5ImgWidth > data.content.h5ImgHeight) {
124
+ if (data.content.h5ImgWidth > data.content.h5ImgHeight || data.content.h5ImgHeight > maxHeight) {
125
125
  obj.height = 'auto';
126
126
  } else if (data.content.h5ImgHeight) obj.height = data.content.h5ImgHeight * scale;
127
127
  }
@@ -96,6 +96,22 @@ function (_super) {
96
96
  data[key] = value;
97
97
 
98
98
  _this.selfRender();
99
+ }; // button 的hover打开时,继承上方的配置内容
100
+
101
+
102
+ _this.hoverClickEvent = function () {
103
+ var data = _this.props.data;
104
+
105
+ _this.updateAttr(data, 'hover', {
106
+ open: true,
107
+ buttonBorder: data.buttonBorder,
108
+ buttonIcon: data.buttonIcon,
109
+ buttonText: data.buttonText,
110
+ content: {
111
+ backgroundColor: data.content.backgroundColor
112
+ }
113
+ }); // console.log('--ffd, button hover first click', data);
114
+
99
115
  };
100
116
 
101
117
  return _this;
@@ -322,7 +338,8 @@ function (_super) {
322
338
  name: (0, _locale.i18n)('HOVER'),
323
339
  value: hoverSetting,
324
340
  toggleType: 'checkbox',
325
- metaOption: data.hover
341
+ metaOption: data.hover,
342
+ checkClick: this.hoverClickEvent
326
343
  });
327
344
  }
328
345
 
@@ -111,6 +111,18 @@ var newParseUrl = function newParseUrl(urlObj) {
111
111
  };
112
112
  break;
113
113
 
114
+ case _constants.urlTypeMap.MINI_APP:
115
+ // 跳转小程序
116
+ link = '';
117
+ params = {
118
+ action: 'jump',
119
+ params: {
120
+ type: 'MINI_APP',
121
+ url: value
122
+ }
123
+ };
124
+ break;
125
+
114
126
  default:
115
127
  var map = {
116
128
  '/main/cart': 'CART',
@@ -266,6 +266,10 @@ function commonFetch(url, data, method) {
266
266
  }
267
267
 
268
268
  var navigateTo = function navigateTo(url) {
269
+ if (!url) {
270
+ return;
271
+ }
272
+
269
273
  if (!window.magicDesign || !window.magicDesign.history) {
270
274
  window.location.href = url;
271
275
  return;
@@ -292,7 +292,6 @@ var clickUrl = function clickUrl(url) {
292
292
  }
293
293
 
294
294
  console.log('clickUrl...', url);
295
- if (!url) return;
296
295
 
297
296
  if (window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
298
297
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.1.22",
4
+ "version": "0.1.24",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",