@fonixtree/magic-design 0.0.81 → 0.0.83
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/bol/components/Banner/mobile/index.js +48 -2
- package/es/composite-comp/bol/components/Banner/pc/index.js +62 -16
- package/es/composite-comp/bol/components/Button/index.less +8 -9
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +69 -18
- package/es/composite-comp/bol/components/Carousel/mobile/index.less +9 -4
- package/es/composite-comp/bol/components/Carousel/pc/index.js +79 -31
- package/es/composite-comp/bol/components/Carousel/pc/index.less +10 -9
- package/es/composite-comp/bol/components/ImageText/defaultJSON.js +28 -8
- package/es/composite-comp/bol/components/ImageText/mobile/index.js +1 -0
- package/es/composite-comp/bol/components/Newsletter/index.less +1 -1
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +4 -2
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout2.png +0 -0
- package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +0 -1
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +4 -2
- package/es/composite-comp/common/components/ProductItem/index.less +1 -0
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +2 -4
- package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +9 -10
- package/es/composite-comp/dito/components/PcNavigation/pc/index.less +8 -0
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +8 -5
- package/es/composite-comp/dito/components/Recommend/pc/index.js +6 -4
- package/es/composite-comp/dito/components/Recommend/pc/index.less +1 -0
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +2 -2
- package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +0 -1
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +1 -1
- package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +2 -0
- package/es/core/Designer/CompListPanel/CompCard/index.js +3 -1
- package/es/core/Designer/CompListPanel/index.js +3 -3
- package/es/decorator/compositeDecorator.js +16 -13
- package/es/locale/en/en.json +2 -2
- package/es/locale/id/id.json +2 -2
- package/es/meta-comp/components/Image/index.js +5 -0
- package/es/meta-comp/components/Image/index.less +2 -2
- package/es/meta-comp/components/Text/index.less +1 -0
- package/es/utils/businessUtil.js +3 -3
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +48 -2
- package/lib/composite-comp/bol/components/Banner/pc/index.js +62 -16
- package/lib/composite-comp/bol/components/Button/index.less +8 -9
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +69 -18
- package/lib/composite-comp/bol/components/Carousel/mobile/index.less +9 -4
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +79 -31
- package/lib/composite-comp/bol/components/Carousel/pc/index.less +10 -9
- package/lib/composite-comp/bol/components/ImageText/defaultJSON.js +28 -8
- package/lib/composite-comp/bol/components/ImageText/mobile/index.js +1 -0
- package/lib/composite-comp/bol/components/Newsletter/index.less +1 -1
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +4 -2
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout2.png +0 -0
- package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +0 -1
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +4 -2
- package/lib/composite-comp/common/components/ProductItem/index.less +1 -0
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +2 -4
- package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +9 -10
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +8 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +8 -5
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +6 -4
- package/lib/composite-comp/dito/components/Recommend/pc/index.less +1 -0
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +2 -2
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +0 -1
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +1 -1
- package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +2 -0
- package/lib/core/Designer/CompListPanel/CompCard/index.js +3 -1
- package/lib/core/Designer/CompListPanel/index.js +3 -3
- package/lib/decorator/compositeDecorator.js +16 -13
- package/lib/locale/en/en.json +2 -2
- package/lib/locale/id/id.json +2 -2
- package/lib/meta-comp/components/Image/index.js +5 -0
- package/lib/meta-comp/components/Image/index.less +2 -2
- package/lib/meta-comp/components/Text/index.less +1 -0
- package/lib/utils/businessUtil.js +3 -3
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
.m-carousel-pc {
|
|
2
2
|
position: relative;
|
|
3
|
-
overflow-x: auto;
|
|
4
3
|
width: 100%;
|
|
5
4
|
|
|
6
5
|
.content {
|
|
7
6
|
display: flex;
|
|
8
|
-
width: fit-content;
|
|
9
7
|
margin: 0 auto;
|
|
10
8
|
}
|
|
11
9
|
|
|
12
10
|
.carousel-icon-left {
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
margin-right: 20px;
|
|
12
|
+
cursor: pointer;
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
.carousel-icon-right {
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
margin-left: 20px;
|
|
17
|
+
cursor: pointer;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
.slider-wrap {
|
|
23
|
-
width: 100
|
|
24
|
-
padding: 30px 0;
|
|
21
|
+
width: calc(100% - 72px);
|
|
25
22
|
margin: 0 auto;
|
|
23
|
+
line-height: 1;
|
|
26
24
|
|
|
27
25
|
.img-wrap {
|
|
26
|
+
overflow-x: auto;
|
|
27
|
+
|
|
28
28
|
.img {
|
|
29
29
|
width: fit-content;
|
|
30
30
|
height: fit-content;
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
.tags {
|
|
48
48
|
margin-top: 8px;
|
|
49
|
+
margin-bottom: 12px;
|
|
49
50
|
display: flex;
|
|
50
51
|
flex-direction: row;
|
|
51
52
|
align-items: center;
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
.swiper-ban {
|
|
71
72
|
position: absolute;
|
|
72
73
|
width: 100%;
|
|
73
|
-
bottom:
|
|
74
|
+
bottom: 10px;
|
|
74
75
|
left: 0;
|
|
75
76
|
right: 0;
|
|
76
77
|
display: flex;
|
|
@@ -103,6 +103,20 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
|
|
|
103
103
|
iconUrl: '',
|
|
104
104
|
layout: 'right'
|
|
105
105
|
},
|
|
106
|
+
spacing: {
|
|
107
|
+
pc: {
|
|
108
|
+
paddingTop: 6,
|
|
109
|
+
paddingBottom: 6,
|
|
110
|
+
paddingLeft: 10,
|
|
111
|
+
paddingRight: 10
|
|
112
|
+
},
|
|
113
|
+
mobile: {
|
|
114
|
+
paddingTop: 6,
|
|
115
|
+
paddingBottom: 6,
|
|
116
|
+
paddingLeft: 10,
|
|
117
|
+
paddingRight: 10
|
|
118
|
+
}
|
|
119
|
+
},
|
|
106
120
|
hover: {
|
|
107
121
|
open: false,
|
|
108
122
|
content: {
|
|
@@ -125,10 +139,6 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
|
|
|
125
139
|
iconUrl: '',
|
|
126
140
|
layout: 'right'
|
|
127
141
|
}
|
|
128
|
-
},
|
|
129
|
-
spacing: {
|
|
130
|
-
pc: {},
|
|
131
|
-
mobile: {}
|
|
132
142
|
}
|
|
133
143
|
},
|
|
134
144
|
secondButton: {
|
|
@@ -158,6 +168,20 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
|
|
|
158
168
|
iconUrl: '',
|
|
159
169
|
layout: 'right'
|
|
160
170
|
},
|
|
171
|
+
spacing: {
|
|
172
|
+
pc: {
|
|
173
|
+
paddingTop: 6,
|
|
174
|
+
paddingBottom: 6,
|
|
175
|
+
paddingLeft: 10,
|
|
176
|
+
paddingRight: 10
|
|
177
|
+
},
|
|
178
|
+
mobile: {
|
|
179
|
+
paddingTop: 6,
|
|
180
|
+
paddingBottom: 6,
|
|
181
|
+
paddingLeft: 10,
|
|
182
|
+
paddingRight: 10
|
|
183
|
+
}
|
|
184
|
+
},
|
|
161
185
|
hover: {
|
|
162
186
|
open: false,
|
|
163
187
|
content: {
|
|
@@ -180,10 +204,6 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
|
|
|
180
204
|
iconUrl: '',
|
|
181
205
|
layout: 'right'
|
|
182
206
|
}
|
|
183
|
-
},
|
|
184
|
-
spacing: {
|
|
185
|
-
pc: {},
|
|
186
|
-
mobile: {}
|
|
187
207
|
}
|
|
188
208
|
},
|
|
189
209
|
background: {
|
|
@@ -123,6 +123,7 @@ function (_super) {
|
|
|
123
123
|
cardBtnStyle.justifyContent = _AlignSelector.alignItemMap[data.customize.align];
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
console.log('source', data);
|
|
126
127
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
127
128
|
className: (0, _classnames["default"])('image-text-mobile', data.customize.layout.h5Layout),
|
|
128
129
|
style: wrapStyle
|
|
@@ -21,6 +21,8 @@ require("./index.less");
|
|
|
21
21
|
|
|
22
22
|
var _locale = require("../../../../../locale");
|
|
23
23
|
|
|
24
|
+
var _decorator = require("../../../../../decorator");
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
27
|
|
|
26
28
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
@@ -98,7 +100,7 @@ function (_super) {
|
|
|
98
100
|
className: "card_wrap"
|
|
99
101
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
102
|
className: "name"
|
|
101
|
-
},
|
|
103
|
+
}, src.button.text));
|
|
102
104
|
};
|
|
103
105
|
|
|
104
106
|
return _this;
|
|
@@ -133,7 +135,7 @@ function (_super) {
|
|
|
133
135
|
AComponent.defaultProps = {
|
|
134
136
|
source: []
|
|
135
137
|
};
|
|
136
|
-
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
|
|
138
|
+
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], AComponent);
|
|
137
139
|
return AComponent;
|
|
138
140
|
}(_react["default"].Component);
|
|
139
141
|
|
|
Binary file
|
|
Binary file
|
|
@@ -21,6 +21,8 @@ require("./index.less");
|
|
|
21
21
|
|
|
22
22
|
var _locale = require("../../../../../locale");
|
|
23
23
|
|
|
24
|
+
var _decorator = require("../../../../../decorator");
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
27
|
|
|
26
28
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
@@ -98,7 +100,7 @@ function (_super) {
|
|
|
98
100
|
className: "card_wrap"
|
|
99
101
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
102
|
className: "name"
|
|
101
|
-
},
|
|
103
|
+
}, src.button.text));
|
|
102
104
|
};
|
|
103
105
|
|
|
104
106
|
return _this;
|
|
@@ -133,7 +135,7 @@ function (_super) {
|
|
|
133
135
|
AComponent.defaultProps = {
|
|
134
136
|
source: []
|
|
135
137
|
};
|
|
136
|
-
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
|
|
138
|
+
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], AComponent);
|
|
137
139
|
return AComponent;
|
|
138
140
|
}(_react["default"].Component);
|
|
139
141
|
|
|
@@ -62,7 +62,6 @@ function (_super) {
|
|
|
62
62
|
|
|
63
63
|
var _a = this.props,
|
|
64
64
|
data = _a.data,
|
|
65
|
-
configPaddingLR = _a.configPaddingLR,
|
|
66
65
|
configCompSpace = _a.configCompSpace,
|
|
67
66
|
configWidth = _a.configWidth;
|
|
68
67
|
var obj = data[window.magicDesign.device] || {};
|
|
@@ -107,7 +106,7 @@ function (_super) {
|
|
|
107
106
|
_this.selfRender();
|
|
108
107
|
},
|
|
109
108
|
value: obj.paddingBottom || 0
|
|
110
|
-
})),
|
|
109
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
111
110
|
className: "padding-item"
|
|
112
111
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
113
112
|
type: "icon-padding-left"
|
|
@@ -129,7 +128,7 @@ function (_super) {
|
|
|
129
128
|
_this.selfRender();
|
|
130
129
|
},
|
|
131
130
|
value: obj.paddingRight || 0
|
|
132
|
-
}))))
|
|
131
|
+
})))), configCompSpace && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
133
132
|
title: (0, _locale.i18n)('COMPONENT_SPACING')
|
|
134
133
|
}, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
|
|
135
134
|
maxVal: 100,
|
|
@@ -146,7 +145,6 @@ function (_super) {
|
|
|
146
145
|
};
|
|
147
146
|
|
|
148
147
|
SpacingConfig.defaultProps = {
|
|
149
|
-
configPaddingLR: true,
|
|
150
148
|
configCompSpace: true,
|
|
151
149
|
configWidth: false,
|
|
152
150
|
data: {
|
|
@@ -104,8 +104,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
104
104
|
fontWeight: 600,
|
|
105
105
|
fontSize: 8,
|
|
106
106
|
fontStyle: 'normal',
|
|
107
|
-
color: '#fff'
|
|
108
|
-
padding: '0 5px'
|
|
107
|
+
color: '#fff'
|
|
109
108
|
},
|
|
110
109
|
buttonBorder: {
|
|
111
110
|
open: true,
|
|
@@ -114,16 +113,16 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
114
113
|
},
|
|
115
114
|
spacing: {
|
|
116
115
|
pc: {
|
|
117
|
-
paddingTop:
|
|
118
|
-
paddingBottom:
|
|
119
|
-
paddingLeft:
|
|
120
|
-
paddingRight:
|
|
116
|
+
paddingTop: 0,
|
|
117
|
+
paddingBottom: 0,
|
|
118
|
+
paddingLeft: 4,
|
|
119
|
+
paddingRight: 4
|
|
121
120
|
},
|
|
122
121
|
mobile: {
|
|
123
|
-
paddingTop:
|
|
124
|
-
paddingBottom:
|
|
125
|
-
paddingLeft:
|
|
126
|
-
paddingRight:
|
|
122
|
+
paddingTop: 0,
|
|
123
|
+
paddingBottom: 0,
|
|
124
|
+
paddingLeft: 4,
|
|
125
|
+
paddingRight: 4
|
|
127
126
|
}
|
|
128
127
|
},
|
|
129
128
|
buttonIcon: {
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
width: fit-content;
|
|
7
7
|
display: flex;
|
|
8
8
|
align-items: center;
|
|
9
|
+
min-width: 130px;
|
|
9
10
|
|
|
10
11
|
&:hover {
|
|
11
12
|
@keyframes show-active{
|
|
@@ -89,8 +90,15 @@
|
|
|
89
90
|
.category-group {
|
|
90
91
|
margin-left: 180px;
|
|
91
92
|
display: flex;
|
|
93
|
+
overflow-x: scroll;
|
|
94
|
+
flex: 1;
|
|
95
|
+
scroll-snap-type: x;
|
|
92
96
|
.one-category {
|
|
93
97
|
margin-right: 44px;
|
|
98
|
+
scroll-snap-align: end;
|
|
99
|
+
&:last-of-type {
|
|
100
|
+
margin-right: 0;
|
|
101
|
+
}
|
|
94
102
|
}
|
|
95
103
|
}
|
|
96
104
|
|
|
@@ -229,7 +229,7 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
229
229
|
var LAYOUT_IMAGE_SIZE = {
|
|
230
230
|
layout1: {
|
|
231
231
|
w: '100%',
|
|
232
|
-
h:
|
|
232
|
+
h: ''
|
|
233
233
|
},
|
|
234
234
|
layout2: {
|
|
235
235
|
w: 100,
|
|
@@ -237,7 +237,7 @@ var LAYOUT_IMAGE_SIZE = {
|
|
|
237
237
|
},
|
|
238
238
|
layout3: {
|
|
239
239
|
w: '100%',
|
|
240
|
-
h:
|
|
240
|
+
h: ''
|
|
241
241
|
},
|
|
242
242
|
layout4: {
|
|
243
243
|
w: 96,
|
|
@@ -568,12 +568,15 @@ function (_super) {
|
|
|
568
568
|
return groupSource[tabIndex].seeAll;
|
|
569
569
|
}, '');
|
|
570
570
|
|
|
571
|
-
var imgHeight = (0, _commonUtil.ensure)(function () {
|
|
572
|
-
return LAYOUT_IMAGE_SIZE[layout].h;
|
|
573
|
-
}, 140);
|
|
574
571
|
var imgWidth = (0, _commonUtil.ensure)(function () {
|
|
575
572
|
return LAYOUT_IMAGE_SIZE[layout].w;
|
|
576
573
|
}, 140);
|
|
574
|
+
var imgHeight = (0, _commonUtil.ensure)(function () {
|
|
575
|
+
return LAYOUT_IMAGE_SIZE[layout].h;
|
|
576
|
+
}, 140);
|
|
577
|
+
var macyContainerDom = document.querySelector('.m-recommend-mobile');
|
|
578
|
+
if (layout === 'layout1' && macyContainerDom) imgHeight = (macyContainerDom.clientWidth - 32) / 2 - 6;
|
|
579
|
+
if (layout === 'layout3' && macyContainerDom) imgHeight = (macyContainerDom.clientWidth - 32) / 3 - 8;
|
|
577
580
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
578
581
|
className: "m-recommend-mobile",
|
|
579
582
|
style: bgStyle
|
|
@@ -233,7 +233,7 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
233
233
|
var LAYOUT_IMAGE_SIZE = {
|
|
234
234
|
layout1: {
|
|
235
235
|
w: '100%',
|
|
236
|
-
h:
|
|
236
|
+
h: ''
|
|
237
237
|
},
|
|
238
238
|
layout2_col6: {
|
|
239
239
|
w: 160,
|
|
@@ -636,12 +636,14 @@ function (_super) {
|
|
|
636
636
|
return groupSource[tabIndex].seeAll;
|
|
637
637
|
}, '');
|
|
638
638
|
|
|
639
|
-
var imgHeight = (0, _commonUtil.ensure)(function () {
|
|
640
|
-
return layout === 'layout1' ? LAYOUT_IMAGE_SIZE[layout].h : LAYOUT_IMAGE_SIZE[layout + "_col" + panelProps.customize.pcRowNum].h;
|
|
641
|
-
}, 140);
|
|
642
639
|
var imgWidth = (0, _commonUtil.ensure)(function () {
|
|
643
640
|
return layout === 'layout1' ? LAYOUT_IMAGE_SIZE[layout].w : LAYOUT_IMAGE_SIZE[layout + "_col" + panelProps.customize.pcRowNum].w;
|
|
644
641
|
}, 140);
|
|
642
|
+
var imgHeight = (0, _commonUtil.ensure)(function () {
|
|
643
|
+
return layout === 'layout1' ? LAYOUT_IMAGE_SIZE[layout].h : LAYOUT_IMAGE_SIZE[layout + "_col" + panelProps.customize.pcRowNum].h;
|
|
644
|
+
}, 140);
|
|
645
|
+
var macyContainerDom = document.querySelector('.tab-list');
|
|
646
|
+
if (layout === 'layout1' && macyContainerDom) imgHeight = (macyContainerDom.clientWidth - 12 * (panelProps.customize.pcRowNum - 1)) / panelProps.customize.pcRowNum;
|
|
645
647
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
646
648
|
className: "m-recommend-pc",
|
|
647
649
|
style: bgStyle
|
|
@@ -42,7 +42,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
42
42
|
open: true,
|
|
43
43
|
color: {
|
|
44
44
|
pc: '#D92929',
|
|
45
|
-
mobile: '#
|
|
45
|
+
mobile: '#8493AF'
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
icon: {
|
|
@@ -50,7 +50,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
50
50
|
open: true,
|
|
51
51
|
color: {
|
|
52
52
|
pc: '#D92929',
|
|
53
|
-
mobile: '#
|
|
53
|
+
mobile: '#232F46'
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
},
|
|
@@ -86,6 +86,7 @@ function (_super) {
|
|
|
86
86
|
var _this = this;
|
|
87
87
|
|
|
88
88
|
var data = this.props.data;
|
|
89
|
+
console.log('data', data);
|
|
89
90
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
|
|
90
91
|
divider: "bold",
|
|
91
92
|
headerSize: "large",
|
|
@@ -93,6 +94,7 @@ function (_super) {
|
|
|
93
94
|
key: '1',
|
|
94
95
|
name: (0, _locale.i18n)('GROUP'),
|
|
95
96
|
value: /*#__PURE__*/_react["default"].createElement(_RecommendConfigGroup["default"], {
|
|
97
|
+
id: data.id,
|
|
96
98
|
source: data.groupSource
|
|
97
99
|
})
|
|
98
100
|
}, {
|
|
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _Iconfont = _interopRequireDefault(require("../../../../common/Iconfont"));
|
|
11
11
|
|
|
12
|
+
var _constants = require("../../../../constants");
|
|
13
|
+
|
|
12
14
|
require("./index.less");
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -24,7 +26,7 @@ function CompCard(_a) {
|
|
|
24
26
|
className: "comp-info"
|
|
25
27
|
}, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
26
28
|
className: "comp-icon",
|
|
27
|
-
type: icon
|
|
29
|
+
type: icon || _constants.compInfoMap[type].icon
|
|
28
30
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
29
31
|
className: "comp-name"
|
|
30
32
|
}, label)), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
@@ -109,13 +109,13 @@ function (_super) {
|
|
|
109
109
|
className: "title"
|
|
110
110
|
}, (0, _locale.i18n)('ADD_COMPONENT')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
111
111
|
className: "component-list"
|
|
112
|
-
},
|
|
112
|
+
}, compSource.map(function (compCat) {
|
|
113
113
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
114
|
-
key: compCat,
|
|
114
|
+
key: compCat.moduleCatgId,
|
|
115
115
|
className: "cat-list"
|
|
116
116
|
}, /*#__PURE__*/_react["default"].createElement("h5", {
|
|
117
117
|
className: "cat-name"
|
|
118
|
-
}, compCat, "(", "" +
|
|
118
|
+
}, compCat.category, "(", "" + (compCat.modules ? compCat.modules.length : '0'), ")"), compCat.modules && compCat.modules.map(function (comp) {
|
|
119
119
|
return (0, _coreUtil.isActiveFloor)(comp.terminalType) ? /*#__PURE__*/_react["default"].createElement(_CompCard["default"], _extends({}, comp, {
|
|
120
120
|
key: comp.moduleId,
|
|
121
121
|
onAdd: function onAdd() {
|
|
@@ -90,13 +90,13 @@ function compositeDecorator(WrappedComponent) {
|
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
_this.getStyle = function () {
|
|
93
|
+
var nodeData = _this.props.nodeData;
|
|
93
94
|
var wrapStyle = {
|
|
94
95
|
border: 'none'
|
|
95
96
|
};
|
|
96
97
|
var _a = window.magicDesign,
|
|
97
98
|
device = _a.device,
|
|
98
99
|
mode = _a.mode;
|
|
99
|
-
var nodeData = _this.props.nodeData;
|
|
100
100
|
var spacing = nodeData.spacing,
|
|
101
101
|
background = nodeData.background; // 处理复合组件的选中状态
|
|
102
102
|
|
|
@@ -107,22 +107,25 @@ function compositeDecorator(WrappedComponent) {
|
|
|
107
107
|
if (nodeData.id === _this.state.clickedFloor) {
|
|
108
108
|
wrapStyle.border = '1px dashed red';
|
|
109
109
|
}
|
|
110
|
-
} //
|
|
110
|
+
} // banner的padding和background单独处理
|
|
111
111
|
|
|
112
112
|
|
|
113
|
-
if (
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
if (nodeData.type != 'BANNER') {
|
|
114
|
+
// 边距
|
|
115
|
+
if (spacing && spacing[device]) {
|
|
116
|
+
wrapStyle = __assign(__assign({}, wrapStyle), spacing[device]);
|
|
117
|
+
} // 背景
|
|
116
118
|
|
|
117
119
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
if (background) {
|
|
121
|
+
if (background.bgType === 'color') {
|
|
122
|
+
wrapStyle.backgroundColor = background.color;
|
|
123
|
+
wrapStyle.opacity = background.opacity ? background.opacity : 1;
|
|
124
|
+
} else {
|
|
125
|
+
wrapStyle.backgroundImage = "url(" + background.image + ")";
|
|
126
|
+
wrapStyle.backgroundPosition = 'center';
|
|
127
|
+
wrapStyle.backgroundSize = 'cover';
|
|
128
|
+
}
|
|
126
129
|
}
|
|
127
130
|
}
|
|
128
131
|
|
package/es/locale/en/en.json
CHANGED
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"BACKGROUND": "Background",
|
|
33
33
|
"PLACEHOLDER": "Placeholder",
|
|
34
34
|
"FONT_STYLE": "Font Style",
|
|
35
|
-
"FONT_FAMILY": "
|
|
36
|
-
"FONT_WEIGHT": "
|
|
35
|
+
"FONT_FAMILY": "Font Family",
|
|
36
|
+
"FONT_WEIGHT": "Font Weight",
|
|
37
37
|
"FONT_SIZE": "Font Size",
|
|
38
38
|
"LINE_SPACING": "Line Spacing",
|
|
39
39
|
"LINE_COLOR": "Line Color",
|
package/es/locale/id/id.json
CHANGED
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"BACKGROUND": "Background",
|
|
33
33
|
"PLACEHOLDER": "Placeholder",
|
|
34
34
|
"FONT_STYLE": "Font Style",
|
|
35
|
-
"FONT_FAMILY": "
|
|
36
|
-
"FONT_WEIGHT": "
|
|
35
|
+
"FONT_FAMILY": "Font Family",
|
|
36
|
+
"FONT_WEIGHT": "Font Weight",
|
|
37
37
|
"FONT_SIZE": "Font Size",
|
|
38
38
|
"LINE_SPACING": "Line Spacing",
|
|
39
39
|
"LINE_COLOR": "Line Color",
|
|
@@ -78,6 +78,7 @@ function (_super) {
|
|
|
78
78
|
hoverState = _a.hoverState,
|
|
79
79
|
maxHeight = _a.maxHeight,
|
|
80
80
|
maxWidth = _a.maxWidth,
|
|
81
|
+
minHeight = _a.minHeight,
|
|
81
82
|
minWidth = _a.minWidth,
|
|
82
83
|
limitWidthHeight = _a.limitWidthHeight,
|
|
83
84
|
scale = _a.scale;
|
|
@@ -97,6 +98,10 @@ function (_super) {
|
|
|
97
98
|
obj.maxWidth = maxWidth;
|
|
98
99
|
}
|
|
99
100
|
|
|
101
|
+
if (minHeight) {
|
|
102
|
+
obj.minHeight = minHeight;
|
|
103
|
+
}
|
|
104
|
+
|
|
100
105
|
if (minWidth) {
|
|
101
106
|
obj.minWidth = minWidth;
|
|
102
107
|
}
|
package/es/utils/businessUtil.js
CHANGED
|
@@ -20,7 +20,7 @@ var parseUrl = function parseUrl(url) {
|
|
|
20
20
|
switch (type) {
|
|
21
21
|
// 商品详情
|
|
22
22
|
case _constants.urlType.PRODUCT_DETAIL:
|
|
23
|
-
pcLink = "/
|
|
23
|
+
pcLink = "/product/detail/" + arg1 + "?productId=" + (arg2 !== null && arg2 !== void 0 ? arg2 : '');
|
|
24
24
|
h5Link = "/product/detail/" + arg1 + "?productId=" + (arg2 !== null && arg2 !== void 0 ? arg2 : '');
|
|
25
25
|
params = {
|
|
26
26
|
type: 'PROD_DETAIL',
|
|
@@ -33,7 +33,7 @@ var parseUrl = function parseUrl(url) {
|
|
|
33
33
|
|
|
34
34
|
case _constants.urlType.CATG_PROD_LIST:
|
|
35
35
|
// 商品列表
|
|
36
|
-
pcLink = "/
|
|
36
|
+
pcLink = "/product/list/" + arg1;
|
|
37
37
|
h5Link = "/product/list/" + arg1;
|
|
38
38
|
params = {
|
|
39
39
|
type: 'PROD_LIST',
|
|
@@ -57,7 +57,7 @@ var parseUrl = function parseUrl(url) {
|
|
|
57
57
|
|
|
58
58
|
case _constants.urlType.CUSTOMIZED:
|
|
59
59
|
// 自定义页面
|
|
60
|
-
pcLink = "/
|
|
60
|
+
pcLink = "/group/" + arg1;
|
|
61
61
|
h5Link = "/group/" + arg1;
|
|
62
62
|
params = {
|
|
63
63
|
type: 'CUSTOMIZED',
|