@fonixtree/magic-design 0.0.82 → 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/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/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/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/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/package.json +1 -1
|
@@ -13,36 +13,35 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
&.layout1 {
|
|
16
|
-
flex-direction:
|
|
16
|
+
flex-direction: row;
|
|
17
17
|
|
|
18
18
|
&.left {
|
|
19
|
-
|
|
19
|
+
justify-content: flex-start;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
&.center {
|
|
23
|
-
|
|
23
|
+
justify-content: center;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
&.right {
|
|
27
|
-
|
|
27
|
+
justify-content: flex-end;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
&.layout2 {
|
|
32
|
-
flex-direction:
|
|
32
|
+
flex-direction: column;
|
|
33
33
|
|
|
34
34
|
&.left {
|
|
35
|
-
|
|
35
|
+
align-items: flex-start;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
&.center {
|
|
39
|
-
|
|
39
|
+
align-items: center;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
&.right {
|
|
43
|
-
|
|
43
|
+
align-items: flex-end;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
48
47
|
}
|
|
@@ -13,6 +13,10 @@ var _reactSlick = _interopRequireDefault(require("react-slick"));
|
|
|
13
13
|
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
|
|
16
|
+
var _lodash = require("lodash");
|
|
17
|
+
|
|
18
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
19
|
+
|
|
16
20
|
var _components = require("../../../../../meta-comp/components");
|
|
17
21
|
|
|
18
22
|
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
@@ -70,20 +74,20 @@ var __assign = void 0 && (void 0).__assign || function () {
|
|
|
70
74
|
};
|
|
71
75
|
|
|
72
76
|
var MOBILE_IMG_SIZE = [{
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
maxW: 375,
|
|
78
|
+
maxH: 160
|
|
75
79
|
}, {
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
maxW: 169,
|
|
81
|
+
maxH: 126
|
|
78
82
|
}, {
|
|
79
|
-
|
|
80
|
-
|
|
83
|
+
maxW: 109,
|
|
84
|
+
maxH: 82
|
|
81
85
|
}, {
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
maxW: 78,
|
|
87
|
+
maxH: 58
|
|
84
88
|
}, {
|
|
85
|
-
|
|
86
|
-
|
|
89
|
+
maxW: 50,
|
|
90
|
+
maxH: 50
|
|
87
91
|
}];
|
|
88
92
|
|
|
89
93
|
var CarouselMobile =
|
|
@@ -95,9 +99,28 @@ function (_super) {
|
|
|
95
99
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
96
100
|
|
|
97
101
|
_this.state = {
|
|
98
|
-
sliderIndex: 0
|
|
102
|
+
sliderIndex: 0,
|
|
103
|
+
contentWidth: 0
|
|
99
104
|
};
|
|
100
105
|
_this.sliderRef = /*#__PURE__*/_react["default"].createRef();
|
|
106
|
+
_this.destroy = null;
|
|
107
|
+
|
|
108
|
+
_this.listenWidth = function () {
|
|
109
|
+
var renderContainer = document.querySelector('.composite_wrap');
|
|
110
|
+
if (renderContainer) _this.setState({
|
|
111
|
+
contentWidth: renderContainer.offsetWidth
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
_this.sliderGoTo = function (groupSource) {
|
|
116
|
+
var nextIndex = groupSource.findIndex(function (item) {
|
|
117
|
+
return item.id === _mobx.store.clickedGroup;
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
if (nextIndex != -1 && nextIndex != _this.state.sliderIndex) {
|
|
121
|
+
_this.sliderRef.slickGoTo(nextIndex);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
101
124
|
|
|
102
125
|
_this.mouseEnterBtn = function (e) {
|
|
103
126
|
var _a, _b;
|
|
@@ -133,14 +156,24 @@ function (_super) {
|
|
|
133
156
|
CarouselMobile.prototype.componentDidMount = function () {
|
|
134
157
|
var _a;
|
|
135
158
|
|
|
159
|
+
var _this = this;
|
|
160
|
+
|
|
136
161
|
var data = this.props.data;
|
|
137
162
|
|
|
138
163
|
_mobx.store.setState({
|
|
139
164
|
CarouselStore: __assign(__assign({}, _mobx.store.CarouselStore), (_a = {}, _a[data.id] = data.customize.layout, _a))
|
|
140
165
|
});
|
|
166
|
+
|
|
167
|
+
this.destroy = (0, _mobx.autorun)(function () {
|
|
168
|
+
_this.sliderGoTo(_this.props.data.groupSource);
|
|
169
|
+
});
|
|
170
|
+
this.listenWidth();
|
|
171
|
+
window.addEventListener('resize', (0, _lodash.debounce)(this.listenWidth));
|
|
141
172
|
};
|
|
142
173
|
|
|
143
174
|
CarouselMobile.prototype.componentWillReceiveProps = function (nextProps) {
|
|
175
|
+
this.sliderGoTo(nextProps.data.groupSource);
|
|
176
|
+
|
|
144
177
|
if (nextProps.data.setting.autoplay.open) {
|
|
145
178
|
this.sliderRef.slickPlay();
|
|
146
179
|
} else {
|
|
@@ -148,11 +181,17 @@ function (_super) {
|
|
|
148
181
|
}
|
|
149
182
|
};
|
|
150
183
|
|
|
184
|
+
CarouselMobile.prototype.componentWillUnmount = function () {
|
|
185
|
+
this.destroy();
|
|
186
|
+
};
|
|
187
|
+
|
|
151
188
|
CarouselMobile.prototype.render = function () {
|
|
152
189
|
var _this = this;
|
|
153
190
|
|
|
154
191
|
var data = this.props.data;
|
|
155
|
-
var
|
|
192
|
+
var _a = this.state,
|
|
193
|
+
sliderIndex = _a.sliderIndex,
|
|
194
|
+
contentWidth = _a.contentWidth;
|
|
156
195
|
var showText = data.customize.layout === 'layout2';
|
|
157
196
|
var colNum = showText ? 1 : Math.min(data.customize.rowNum, data.groupSource.length);
|
|
158
197
|
var bgStyle = {};
|
|
@@ -168,13 +207,18 @@ function (_super) {
|
|
|
168
207
|
};
|
|
169
208
|
}
|
|
170
209
|
|
|
171
|
-
var
|
|
172
|
-
|
|
210
|
+
var autoplay = data.setting.autoplay.open;
|
|
211
|
+
/** 设计器模式下 如果选中特定group 自动播放关闭 */
|
|
212
|
+
|
|
213
|
+
if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
|
|
214
|
+
autoplay = false;
|
|
215
|
+
}
|
|
216
|
+
|
|
173
217
|
var settings = {
|
|
174
218
|
className: 'slider-wrap',
|
|
175
219
|
arrows: false,
|
|
176
220
|
dots: false,
|
|
177
|
-
autoplay:
|
|
221
|
+
autoplay: autoplay,
|
|
178
222
|
autoplaySpeed: data.setting.autoplay.interval * 1000,
|
|
179
223
|
speed: 500,
|
|
180
224
|
draggable: window.magicDesign.mode === 'renderer',
|
|
@@ -186,9 +230,16 @@ function (_super) {
|
|
|
186
230
|
});
|
|
187
231
|
}
|
|
188
232
|
};
|
|
233
|
+
var spacing = data.spacing[window.magicDesign.device];
|
|
189
234
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
190
235
|
className: "m-carousel-mobile",
|
|
191
236
|
style: bgStyle
|
|
237
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
238
|
+
className: "content",
|
|
239
|
+
style: {
|
|
240
|
+
width: contentWidth - spacing.paddingLeft - spacing.paddingRight,
|
|
241
|
+
paddingBottom: data.setting.dots.open ? '20px' : '0'
|
|
242
|
+
}
|
|
192
243
|
}, /*#__PURE__*/_react["default"].createElement(_reactSlick["default"], _extends({
|
|
193
244
|
ref: function ref(slider) {
|
|
194
245
|
return _this.sliderRef = slider;
|
|
@@ -201,8 +252,8 @@ function (_super) {
|
|
|
201
252
|
className: "img"
|
|
202
253
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
203
254
|
data: item.image,
|
|
204
|
-
maxHeight: MOBILE_IMG_SIZE[colNum - 1].
|
|
205
|
-
maxWidth: MOBILE_IMG_SIZE[colNum - 1].
|
|
255
|
+
maxHeight: MOBILE_IMG_SIZE[colNum - 1].maxH,
|
|
256
|
+
maxWidth: MOBILE_IMG_SIZE[colNum - 1].maxW
|
|
206
257
|
})), showText && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, item.title.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
207
258
|
className: "title"
|
|
208
259
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
@@ -237,7 +288,7 @@ function (_super) {
|
|
|
237
288
|
fontSize: i == sliderIndex ? data.setting.dots.hoverSize : data.setting.dots.size
|
|
238
289
|
}
|
|
239
290
|
});
|
|
240
|
-
})));
|
|
291
|
+
}))));
|
|
241
292
|
};
|
|
242
293
|
|
|
243
294
|
CarouselMobile.defaultProps = {
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
.m-carousel-mobile {
|
|
2
|
-
display: flex;
|
|
3
2
|
position: relative;
|
|
4
|
-
|
|
3
|
+
width: 100%;
|
|
4
|
+
|
|
5
|
+
.content {
|
|
6
|
+
display: flex;
|
|
7
|
+
margin: 0 auto;
|
|
8
|
+
}
|
|
5
9
|
|
|
6
10
|
.slider-wrap {
|
|
7
11
|
width: 100%;
|
|
8
|
-
padding: 30px 0;
|
|
9
12
|
margin: 0 auto;
|
|
13
|
+
line-height: 1;
|
|
10
14
|
|
|
11
15
|
.img-wrap {
|
|
12
16
|
.img {
|
|
@@ -30,6 +34,7 @@
|
|
|
30
34
|
|
|
31
35
|
.tags {
|
|
32
36
|
margin-top: 8px;
|
|
37
|
+
margin-bottom: 12px;
|
|
33
38
|
display: flex;
|
|
34
39
|
flex-direction: row;
|
|
35
40
|
align-items: center;
|
|
@@ -54,7 +59,7 @@
|
|
|
54
59
|
.swiper-ban {
|
|
55
60
|
position: absolute;
|
|
56
61
|
width: 100%;
|
|
57
|
-
bottom:
|
|
62
|
+
bottom: 6px;
|
|
58
63
|
display: flex;
|
|
59
64
|
align-items: center;
|
|
60
65
|
justify-content: center;
|
|
@@ -13,8 +13,12 @@ var _reactSlick = _interopRequireDefault(require("react-slick"));
|
|
|
13
13
|
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
|
|
16
|
+
var _lodash = require("lodash");
|
|
17
|
+
|
|
16
18
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
19
|
|
|
20
|
+
var _mobx = require("../../../../../mobx");
|
|
21
|
+
|
|
18
22
|
var _components = require("../../../../../meta-comp/components");
|
|
19
23
|
|
|
20
24
|
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
@@ -25,10 +29,14 @@ require("slick-carousel/slick/slick.css");
|
|
|
25
29
|
|
|
26
30
|
require("slick-carousel/slick/slick-theme.css");
|
|
27
31
|
|
|
32
|
+
var _ref, _ref2, _ref3, _ref4;
|
|
33
|
+
|
|
28
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
35
|
|
|
30
36
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
37
|
|
|
38
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
|
+
|
|
32
40
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
33
41
|
var _extendStatics = function extendStatics(d, b) {
|
|
34
42
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -56,30 +64,28 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
56
64
|
}();
|
|
57
65
|
|
|
58
66
|
var PC_IMG_SIZE = [{
|
|
59
|
-
minW:
|
|
67
|
+
minW: 150,
|
|
60
68
|
maxW: 1072,
|
|
61
|
-
|
|
69
|
+
minH: 150,
|
|
70
|
+
maxH: 400
|
|
62
71
|
}, {
|
|
63
|
-
minW:
|
|
72
|
+
minW: 150,
|
|
64
73
|
maxW: 524,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, {
|
|
71
|
-
minW:
|
|
72
|
-
maxW: 251
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
maxW: 168,
|
|
81
|
-
maxH: 126
|
|
82
|
-
}];
|
|
74
|
+
minH: 150,
|
|
75
|
+
maxH: 524
|
|
76
|
+
}, (_ref = {
|
|
77
|
+
minW: 100,
|
|
78
|
+
maxW: 341
|
|
79
|
+
}, _defineProperty(_ref, "minW", 100), _defineProperty(_ref, "maxW", 341), _ref), (_ref2 = {
|
|
80
|
+
minW: 100,
|
|
81
|
+
maxW: 251
|
|
82
|
+
}, _defineProperty(_ref2, "minW", 100), _defineProperty(_ref2, "maxW", 251), _ref2), (_ref3 = {
|
|
83
|
+
minW: 100,
|
|
84
|
+
maxW: 195
|
|
85
|
+
}, _defineProperty(_ref3, "minW", 100), _defineProperty(_ref3, "maxW", 195), _ref3), (_ref4 = {
|
|
86
|
+
minW: 100,
|
|
87
|
+
maxW: 168
|
|
88
|
+
}, _defineProperty(_ref4, "minW", 100), _defineProperty(_ref4, "maxW", 168), _ref4)];
|
|
83
89
|
|
|
84
90
|
var CarouselPc =
|
|
85
91
|
/** @class */
|
|
@@ -90,9 +96,28 @@ function (_super) {
|
|
|
90
96
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
91
97
|
|
|
92
98
|
_this.state = {
|
|
93
|
-
sliderIndex: 0
|
|
99
|
+
sliderIndex: 0,
|
|
100
|
+
contentWidth: 0
|
|
94
101
|
};
|
|
95
102
|
_this.sliderRef = /*#__PURE__*/_react["default"].createRef();
|
|
103
|
+
_this.destroy = null;
|
|
104
|
+
|
|
105
|
+
_this.listenWidth = function () {
|
|
106
|
+
var renderContainer = document.querySelector('.composite_wrap');
|
|
107
|
+
if (renderContainer) _this.setState({
|
|
108
|
+
contentWidth: renderContainer.offsetWidth
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
_this.sliderGoTo = function (groupSource) {
|
|
113
|
+
var nextIndex = groupSource.findIndex(function (item) {
|
|
114
|
+
return item.id === _mobx.store.clickedGroup;
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
if (nextIndex != -1 && nextIndex != _this.state.sliderIndex) {
|
|
118
|
+
_this.sliderRef.slickGoTo(nextIndex);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
96
121
|
|
|
97
122
|
_this.mouseEnterBtn = function (e) {
|
|
98
123
|
var _a, _b;
|
|
@@ -125,7 +150,19 @@ function (_super) {
|
|
|
125
150
|
return _this;
|
|
126
151
|
}
|
|
127
152
|
|
|
153
|
+
CarouselPc.prototype.componentDidMount = function () {
|
|
154
|
+
var _this = this;
|
|
155
|
+
|
|
156
|
+
this.destroy = (0, _mobx.autorun)(function () {
|
|
157
|
+
_this.sliderGoTo(_this.props.data.groupSource);
|
|
158
|
+
});
|
|
159
|
+
this.listenWidth();
|
|
160
|
+
window.addEventListener('resize', (0, _lodash.debounce)(this.listenWidth));
|
|
161
|
+
};
|
|
162
|
+
|
|
128
163
|
CarouselPc.prototype.componentWillReceiveProps = function (nextProps) {
|
|
164
|
+
this.sliderGoTo(nextProps.data.groupSource);
|
|
165
|
+
|
|
129
166
|
if (nextProps.data.setting.autoplay.open) {
|
|
130
167
|
this.sliderRef.slickPlay();
|
|
131
168
|
} else {
|
|
@@ -133,11 +170,17 @@ function (_super) {
|
|
|
133
170
|
}
|
|
134
171
|
};
|
|
135
172
|
|
|
173
|
+
CarouselPc.prototype.componentWillUnmount = function () {
|
|
174
|
+
this.destroy();
|
|
175
|
+
};
|
|
176
|
+
|
|
136
177
|
CarouselPc.prototype.render = function () {
|
|
137
178
|
var _this = this;
|
|
138
179
|
|
|
139
180
|
var data = this.props.data;
|
|
140
|
-
var
|
|
181
|
+
var _a = this.state,
|
|
182
|
+
sliderIndex = _a.sliderIndex,
|
|
183
|
+
contentWidth = _a.contentWidth;
|
|
141
184
|
var showText = data.customize.layout === 'layout2';
|
|
142
185
|
var colNum = showText ? 1 : Math.min(data.customize.pcRowNum, data.groupSource.length);
|
|
143
186
|
var bgStyle = {};
|
|
@@ -153,11 +196,18 @@ function (_super) {
|
|
|
153
196
|
};
|
|
154
197
|
}
|
|
155
198
|
|
|
199
|
+
var autoplay = data.setting.autoplay.open;
|
|
200
|
+
/** 设计器模式下 如果选中特定group 自动播放关闭 */
|
|
201
|
+
|
|
202
|
+
if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
|
|
203
|
+
autoplay = false;
|
|
204
|
+
}
|
|
205
|
+
|
|
156
206
|
var settings = {
|
|
157
207
|
className: 'slider-wrap',
|
|
158
208
|
arrows: false,
|
|
159
209
|
dots: false,
|
|
160
|
-
autoplay:
|
|
210
|
+
autoplay: autoplay,
|
|
161
211
|
autoplaySpeed: data.setting.autoplay.interval * 1000,
|
|
162
212
|
speed: 500,
|
|
163
213
|
draggable: window.magicDesign.mode === 'renderer',
|
|
@@ -180,7 +230,8 @@ function (_super) {
|
|
|
180
230
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
181
231
|
className: "content",
|
|
182
232
|
style: {
|
|
183
|
-
width: spacing.
|
|
233
|
+
width: contentWidth - spacing.paddingLeft - spacing.paddingRight,
|
|
234
|
+
paddingBottom: data.setting.dots.open ? '30px' : '0'
|
|
184
235
|
}
|
|
185
236
|
}, data.setting.navigation.open && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
186
237
|
className: "carousel-icon-left",
|
|
@@ -191,11 +242,7 @@ function (_super) {
|
|
|
191
242
|
onMouseLeave: this.mouseLeaveBtn,
|
|
192
243
|
style: navStyle,
|
|
193
244
|
type: "icon-left"
|
|
194
|
-
}), /*#__PURE__*/_react["default"].createElement("
|
|
195
|
-
style: {
|
|
196
|
-
width: spacing.contentWidth || 'calc(100% - 52px)'
|
|
197
|
-
}
|
|
198
|
-
}, /*#__PURE__*/_react["default"].createElement(_reactSlick["default"], _extends({
|
|
245
|
+
}), /*#__PURE__*/_react["default"].createElement(_reactSlick["default"], _extends({
|
|
199
246
|
ref: function ref(slider) {
|
|
200
247
|
return _this.sliderRef = slider;
|
|
201
248
|
}
|
|
@@ -209,6 +256,7 @@ function (_super) {
|
|
|
209
256
|
data: item.image,
|
|
210
257
|
maxHeight: PC_IMG_SIZE[colNum - 1].maxH,
|
|
211
258
|
maxWidth: PC_IMG_SIZE[colNum - 1].maxW,
|
|
259
|
+
minHeight: PC_IMG_SIZE[colNum - 1].minH,
|
|
212
260
|
minWidth: PC_IMG_SIZE[colNum - 1].minW
|
|
213
261
|
})), showText && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, item.title.open && !((0, _coreUtil.isPc)() && item.title.pcText === '') && /*#__PURE__*/_react["default"].createElement("div", {
|
|
214
262
|
className: "title"
|
|
@@ -228,7 +276,7 @@ function (_super) {
|
|
|
228
276
|
}), item.secondButtonTag.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
229
277
|
data: item.secondButtonTag
|
|
230
278
|
}))));
|
|
231
|
-
}))
|
|
279
|
+
})), data.setting.dots.open && Math.ceil(data.groupSource.length / colNum) > 1 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
232
280
|
className: "swiper-ban"
|
|
233
281
|
}, data.groupSource.length > 1 && data.groupSource.map(function (item, i) {
|
|
234
282
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -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
|
|