@fonixtree/magic-design 0.0.83 → 0.0.84
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 +5 -1
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +1 -1
- package/es/composite-comp/bol/components/Carousel/pc/index.js +1 -1
- package/es/composite-comp/bol/components/ImageGallery/defaultJSON.js +9 -3
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.js +53 -15
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +11 -63
- package/es/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +4 -2
- package/es/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +4 -3
- package/es/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +6 -17
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +30 -20
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +8 -6
- package/es/constants/component-types.js +3 -1
- package/es/constants/layout.js +1 -6
- package/es/core/Designer/ConfigPanel/index.js +1 -0
- package/es/locale/en/en.json +1 -0
- package/es/locale/es/es.json +1 -0
- package/es/locale/id/id.json +1 -0
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +5 -1
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +1 -1
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +1 -1
- package/lib/composite-comp/bol/components/ImageGallery/defaultJSON.js +9 -3
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.js +53 -15
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +11 -63
- package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +4 -2
- package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +4 -3
- package/lib/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +6 -17
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +30 -20
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +8 -6
- package/lib/constants/component-types.js +3 -1
- package/lib/constants/layout.js +1 -6
- package/lib/core/Designer/ConfigPanel/index.js +1 -0
- package/lib/locale/en/en.json +1 -0
- package/lib/locale/es/es.json +1 -0
- package/lib/locale/id/id.json +1 -0
- package/package.json +1 -1
|
@@ -19,6 +19,8 @@ var _coreUtil = require("../../../../../utils/coreUtil");
|
|
|
19
19
|
|
|
20
20
|
var _AlignSelector = require("../../../../../common/AlignSelector");
|
|
21
21
|
|
|
22
|
+
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
23
|
+
|
|
22
24
|
var _components = require("../../../../../meta-comp/components");
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -171,7 +173,9 @@ function (_super) {
|
|
|
171
173
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
172
174
|
className: "m-banner-mobile",
|
|
173
175
|
style: {
|
|
174
|
-
marginBottom:
|
|
176
|
+
marginBottom: (0, _commonUtil.ensure)(function () {
|
|
177
|
+
return data.spacing.mobile.marginBottom;
|
|
178
|
+
}, 0)
|
|
175
179
|
}
|
|
176
180
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Carousel, {
|
|
177
181
|
ref: this.carouselRef,
|
|
@@ -238,7 +238,7 @@ function (_super) {
|
|
|
238
238
|
className: "content",
|
|
239
239
|
style: {
|
|
240
240
|
width: contentWidth - spacing.paddingLeft - spacing.paddingRight,
|
|
241
|
-
paddingBottom: data.setting.dots.open ? '20px' : '0'
|
|
241
|
+
paddingBottom: data.setting.dots.open && data.groupSource.length / colNum > 1 ? '20px' : '0'
|
|
242
242
|
}
|
|
243
243
|
}, /*#__PURE__*/_react["default"].createElement(_reactSlick["default"], _extends({
|
|
244
244
|
ref: function ref(slider) {
|
|
@@ -231,7 +231,7 @@ function (_super) {
|
|
|
231
231
|
className: "content",
|
|
232
232
|
style: {
|
|
233
233
|
width: contentWidth - spacing.paddingLeft - spacing.paddingRight,
|
|
234
|
-
paddingBottom: data.setting.dots.open ? '30px' : '0'
|
|
234
|
+
paddingBottom: data.setting.dots.open && data.groupSource.length / colNum > 1 ? '30px' : '0'
|
|
235
235
|
}
|
|
236
236
|
}, data.setting.navigation.open && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
237
237
|
className: "carousel-icon-left",
|
|
@@ -22,8 +22,8 @@ var imagesGroupSourceJSON = function imagesGroupSourceJSON() {
|
|
|
22
22
|
open: true,
|
|
23
23
|
type: 'IMAGE',
|
|
24
24
|
content: {
|
|
25
|
-
h5Name: '
|
|
26
|
-
pcName: '
|
|
25
|
+
h5Name: 'Image Name',
|
|
26
|
+
pcName: 'Image Name',
|
|
27
27
|
h5ImgSrc: '',
|
|
28
28
|
pcImgSrc: '',
|
|
29
29
|
clickUrl: ''
|
|
@@ -60,7 +60,13 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
60
60
|
},
|
|
61
61
|
customize: {
|
|
62
62
|
layout: 'layout1',
|
|
63
|
-
align: 'left'
|
|
63
|
+
align: 'left',
|
|
64
|
+
pcRowNum: 2,
|
|
65
|
+
rowNum: 2,
|
|
66
|
+
mobileMinRowNum: 2,
|
|
67
|
+
mobileMaxRowNum: 5,
|
|
68
|
+
pcMinRowNum: 2,
|
|
69
|
+
pcMaxRowNum: 6
|
|
64
70
|
},
|
|
65
71
|
background: {
|
|
66
72
|
opacity: 100,
|
|
@@ -7,9 +7,11 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
10
12
|
require("./index.less");
|
|
11
13
|
|
|
12
|
-
var
|
|
14
|
+
var _components = require("../../../../../meta-comp/components");
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
17
|
|
|
@@ -39,6 +41,34 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
39
41
|
};
|
|
40
42
|
}();
|
|
41
43
|
|
|
44
|
+
var MOBILE_IMG_SIZE = {
|
|
45
|
+
1: {
|
|
46
|
+
maxW: 343,
|
|
47
|
+
maxH: 258,
|
|
48
|
+
gap: 12
|
|
49
|
+
},
|
|
50
|
+
2: {
|
|
51
|
+
maxW: 165,
|
|
52
|
+
maxH: 124,
|
|
53
|
+
gap: 12
|
|
54
|
+
},
|
|
55
|
+
3: {
|
|
56
|
+
maxW: 106,
|
|
57
|
+
maxH: 80,
|
|
58
|
+
gap: 12
|
|
59
|
+
},
|
|
60
|
+
4: {
|
|
61
|
+
maxW: 77,
|
|
62
|
+
maxH: 56,
|
|
63
|
+
gap: 12
|
|
64
|
+
},
|
|
65
|
+
5: {
|
|
66
|
+
maxW: 62,
|
|
67
|
+
maxH: 45,
|
|
68
|
+
gap: 8
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
42
72
|
var ImageGalleryMobile =
|
|
43
73
|
/** @class */
|
|
44
74
|
function (_super) {
|
|
@@ -48,27 +78,35 @@ function (_super) {
|
|
|
48
78
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
49
79
|
|
|
50
80
|
_this.state = {};
|
|
51
|
-
_this.carouselRef = /*#__PURE__*/_react["default"].createRef();
|
|
52
|
-
_this.destroy = null;
|
|
53
81
|
return _this;
|
|
54
82
|
}
|
|
55
83
|
|
|
56
|
-
ImageGalleryMobile.prototype.componentDidMount = function () {
|
|
57
|
-
this.destroy = (0, _mobx.autorun)(function () {// this.init(this.props.data.groupSource);
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
ImageGalleryMobile.prototype.componentWillReceiveProps = function (nextProps) {// this.init(nextProps.data.groupSource);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
ImageGalleryMobile.prototype.componentWillUnmount = function () {// this.destroy();
|
|
65
|
-
};
|
|
66
|
-
|
|
67
84
|
ImageGalleryMobile.prototype.render = function () {
|
|
68
85
|
var data = this.props.data;
|
|
86
|
+
var isHorizontal = data.customize.layout === 'layout2';
|
|
87
|
+
var colNum = isHorizontal ? data.customize.rowNum : 1;
|
|
69
88
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
89
|
className: "m-image-gallery-mobile"
|
|
71
|
-
}, "
|
|
90
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
|
+
className: (0, _classnames["default"])('content', {
|
|
92
|
+
horizontal: isHorizontal
|
|
93
|
+
}),
|
|
94
|
+
style: {
|
|
95
|
+
gap: MOBILE_IMG_SIZE[colNum].gap
|
|
96
|
+
}
|
|
97
|
+
}, data.groupSource.map(function (m) {
|
|
98
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
99
|
+
key: m.id,
|
|
100
|
+
className: "img-wrap",
|
|
101
|
+
style: {
|
|
102
|
+
width: MOBILE_IMG_SIZE[colNum].maxW
|
|
103
|
+
}
|
|
104
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
105
|
+
data: m.image,
|
|
106
|
+
maxHeight: MOBILE_IMG_SIZE[colNum].maxH,
|
|
107
|
+
maxWidth: MOBILE_IMG_SIZE[colNum].maxW
|
|
108
|
+
}));
|
|
109
|
+
})));
|
|
72
110
|
};
|
|
73
111
|
|
|
74
112
|
ImageGalleryMobile.defaultProps = {
|
|
@@ -1,73 +1,21 @@
|
|
|
1
|
-
.m-
|
|
2
|
-
|
|
3
|
-
// .turnPage {
|
|
4
|
-
// position: absolute;
|
|
5
|
-
// top: 50%;
|
|
6
|
-
// transform: translateY(-50%);
|
|
7
|
-
// z-index: 3;
|
|
8
|
-
// cursor: pointer;
|
|
9
|
-
// }
|
|
10
|
-
// .leftBtn {
|
|
11
|
-
// left: 20px;
|
|
12
|
-
// }
|
|
13
|
-
// .rightBtn {
|
|
14
|
-
// right: 20px;
|
|
15
|
-
// }
|
|
1
|
+
.m-image-gallery-mobile {
|
|
2
|
+
overflow-x: auto;
|
|
16
3
|
|
|
17
|
-
.
|
|
18
|
-
height: 386px;
|
|
19
|
-
position: relative;
|
|
4
|
+
.content {
|
|
20
5
|
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
width: 345px;
|
|
9
|
+
margin: 0 auto;
|
|
21
10
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
position: relative;
|
|
25
|
-
z-index: 2;
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
margin-bottom: auto;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.title {
|
|
32
|
-
margin-bottom: 8px;
|
|
11
|
+
&.horizontal {
|
|
12
|
+
flex-direction: row;
|
|
33
13
|
}
|
|
34
14
|
|
|
35
|
-
.
|
|
36
|
-
margin-bottom: 20px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.btn-wrap {
|
|
15
|
+
.img-wrap {
|
|
40
16
|
display: flex;
|
|
41
17
|
align-items: center;
|
|
42
|
-
justify-content:
|
|
43
|
-
|
|
44
|
-
.btn {
|
|
45
|
-
margin-right: 12px;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.swiper-ban {
|
|
51
|
-
position: absolute;
|
|
52
|
-
width: 100%;
|
|
53
|
-
bottom: 10px;
|
|
54
|
-
display: flex;
|
|
55
|
-
align-items: center;
|
|
56
|
-
justify-content: center;
|
|
57
|
-
|
|
58
|
-
.ban {
|
|
59
|
-
font-size: 16px;
|
|
60
|
-
width: 1.5em;
|
|
61
|
-
height: 0.3em;
|
|
62
|
-
background: #FFF;
|
|
63
|
-
cursor: inherit;
|
|
64
|
-
margin-right: 0.3em;
|
|
65
|
-
transition: all .5s;
|
|
66
|
-
|
|
67
|
-
&.active {
|
|
68
|
-
width: 1.5em;
|
|
69
|
-
opacity: 1;
|
|
70
|
-
}
|
|
18
|
+
justify-content: center;
|
|
71
19
|
}
|
|
72
20
|
}
|
|
73
21
|
}
|
package/es/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js
CHANGED
|
@@ -21,6 +21,8 @@ var _defaultImg = _interopRequireDefault(require("../imgs/defaultImg.png"));
|
|
|
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); }
|
|
@@ -110,7 +112,7 @@ function (_super) {
|
|
|
110
112
|
src: ((0, _coreUtil.isPc)() ? src.image.content.pcImgSrc : src.image.content.h5ImgSrc) || _defaultImg["default"]
|
|
111
113
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
114
|
className: "name"
|
|
113
|
-
}, src.
|
|
115
|
+
}, (0, _coreUtil.isPc)() ? src.image.content.pcName : src.image.content.h5Name));
|
|
114
116
|
};
|
|
115
117
|
|
|
116
118
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -138,7 +140,7 @@ function (_super) {
|
|
|
138
140
|
AComponent.defaultProps = {
|
|
139
141
|
source: []
|
|
140
142
|
};
|
|
141
|
-
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
|
|
143
|
+
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], AComponent);
|
|
142
144
|
return AComponent;
|
|
143
145
|
}(_react["default"].Component);
|
|
144
146
|
|
|
@@ -30,7 +30,7 @@ function ImageGalleryConfig(props) {
|
|
|
30
30
|
headerSize: "large",
|
|
31
31
|
source: [{
|
|
32
32
|
key: '1',
|
|
33
|
-
name: (0, _locale.i18n)('
|
|
33
|
+
name: (0, _locale.i18n)('IMAGES'),
|
|
34
34
|
value: /*#__PURE__*/_react["default"].createElement(_ImageGalleryConfigImageGroup["default"], {
|
|
35
35
|
source: data.groupSource
|
|
36
36
|
})
|
|
@@ -41,14 +41,15 @@ function ImageGalleryConfig(props) {
|
|
|
41
41
|
data: data.spacing
|
|
42
42
|
})
|
|
43
43
|
}, {
|
|
44
|
-
key: '
|
|
44
|
+
key: '3',
|
|
45
45
|
name: (0, _locale.i18n)('CUSTOMIZE'),
|
|
46
46
|
value: /*#__PURE__*/_react["default"].createElement(_CustomizeConfig["default"], {
|
|
47
|
+
component: "imageGallery",
|
|
47
48
|
data: data.customize,
|
|
48
49
|
layoutSource: _layout.imageGalleryLayout
|
|
49
50
|
})
|
|
50
51
|
}, {
|
|
51
|
-
key: '
|
|
52
|
+
key: '4',
|
|
52
53
|
name: (0, _locale.i18n)('BACKGROUND'),
|
|
53
54
|
value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
|
|
54
55
|
data: data.background
|
|
@@ -7,10 +7,6 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _locale = require("../../../../locale");
|
|
11
|
-
|
|
12
|
-
var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
|
|
13
|
-
|
|
14
10
|
var _ImageConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ImageConfig"));
|
|
15
11
|
|
|
16
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -55,20 +51,13 @@ function (_super) {
|
|
|
55
51
|
|
|
56
52
|
ImageGallerySecondConfig.prototype.render = function () {
|
|
57
53
|
var panelProps = this.props.panelProps;
|
|
58
|
-
console.log('panelProps...', panelProps);
|
|
59
54
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
60
|
-
className: "image_gallery_second_conf_wrap"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
name: (0, _locale.i18n)('IMAGE'),
|
|
67
|
-
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
68
|
-
data: panelProps.image
|
|
69
|
-
}),
|
|
70
|
-
metaOption: panelProps.image
|
|
71
|
-
}]
|
|
55
|
+
className: "image_gallery_second_conf_wrap",
|
|
56
|
+
style: {
|
|
57
|
+
marginTop: '20px'
|
|
58
|
+
}
|
|
59
|
+
}, /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
60
|
+
data: panelProps.image
|
|
72
61
|
}));
|
|
73
62
|
};
|
|
74
63
|
|
|
@@ -91,21 +91,12 @@ function (_super) {
|
|
|
91
91
|
showRowNum: true
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
-
_this.
|
|
94
|
+
_this.onInit = function (v) {
|
|
95
95
|
var _a;
|
|
96
96
|
|
|
97
97
|
var _b = _this.props,
|
|
98
|
-
selectedLayoutFun = _b.selectedLayoutFun,
|
|
99
|
-
data = _b.data,
|
|
100
98
|
component = _b.component,
|
|
101
|
-
id = _b.id;
|
|
102
|
-
|
|
103
|
-
if (selectedLayoutFun) {
|
|
104
|
-
selectedLayoutFun(v);
|
|
105
|
-
} else {
|
|
106
|
-
data.layout = v;
|
|
107
|
-
} // 轮播组件特殊处理
|
|
108
|
-
|
|
99
|
+
id = _b.id; // 轮播组件特殊处理
|
|
109
100
|
|
|
110
101
|
if (component === 'carousel') {
|
|
111
102
|
if (v === 'layout2') {
|
|
@@ -136,6 +127,19 @@ function (_super) {
|
|
|
136
127
|
});
|
|
137
128
|
}
|
|
138
129
|
}
|
|
130
|
+
} // imageGallery 第二种布局可选列数
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
if (component === 'imageGallery') {
|
|
134
|
+
if (v === 'layout2') {
|
|
135
|
+
_this.setState({
|
|
136
|
+
showRowNum: true
|
|
137
|
+
});
|
|
138
|
+
} else {
|
|
139
|
+
_this.setState({
|
|
140
|
+
showRowNum: false
|
|
141
|
+
});
|
|
142
|
+
}
|
|
139
143
|
} // 移动端导航特殊处理
|
|
140
144
|
// 更改需求,两个布局都需 可选行数
|
|
141
145
|
// if (component == 'mobileNavigation') {
|
|
@@ -146,6 +150,20 @@ function (_super) {
|
|
|
146
150
|
// }
|
|
147
151
|
// }
|
|
148
152
|
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
_this.layoutChange = function (v) {
|
|
156
|
+
var _a = _this.props,
|
|
157
|
+
selectedLayoutFun = _a.selectedLayoutFun,
|
|
158
|
+
data = _a.data;
|
|
159
|
+
|
|
160
|
+
if (selectedLayoutFun) {
|
|
161
|
+
selectedLayoutFun(v);
|
|
162
|
+
} else {
|
|
163
|
+
data.layout = v;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
_this.onInit(v);
|
|
149
167
|
|
|
150
168
|
_this.selfRender(); // this.setState({});
|
|
151
169
|
|
|
@@ -169,15 +187,7 @@ function (_super) {
|
|
|
169
187
|
CustomizeConfig.prototype.componentDidMount = function () {
|
|
170
188
|
var _a;
|
|
171
189
|
|
|
172
|
-
|
|
173
|
-
this.setState({
|
|
174
|
-
showRowNum: false
|
|
175
|
-
});
|
|
176
|
-
} else {
|
|
177
|
-
this.setState({
|
|
178
|
-
showRowNum: true
|
|
179
|
-
});
|
|
180
|
-
}
|
|
190
|
+
this.onInit((_a = this.props.data) === null || _a === void 0 ? void 0 : _a.layout);
|
|
181
191
|
};
|
|
182
192
|
|
|
183
193
|
CustomizeConfig.prototype.render = function () {
|
|
@@ -232,6 +232,8 @@ function (_super) {
|
|
|
232
232
|
};
|
|
233
233
|
|
|
234
234
|
SearchMobile.prototype.render = function () {
|
|
235
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
236
|
+
|
|
235
237
|
var data = this.props.data;
|
|
236
238
|
console.log('----search ', data);
|
|
237
239
|
var messageNum = this.state.messageNum; // let styleWrap = {};
|
|
@@ -253,22 +255,22 @@ function (_super) {
|
|
|
253
255
|
className: "m-search-bar"
|
|
254
256
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
255
257
|
className: "right"
|
|
256
|
-
}, data.content && data.content.box.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
258
|
+
}, data.content && ((_a = data.content.box) === null || _a === void 0 ? void 0 : _a.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
257
259
|
className: "search-input-wrap",
|
|
258
260
|
onClick: function onClick() {
|
|
259
261
|
return (0, _coreUtil.clickUrl)('/search-page');
|
|
260
262
|
},
|
|
261
263
|
style: {
|
|
262
|
-
borderColor: data.content.box.color.mobile
|
|
264
|
+
borderColor: (_c = (_b = data.content.box) === null || _b === void 0 ? void 0 : _b.color) === null || _c === void 0 ? void 0 : _c.mobile
|
|
263
265
|
}
|
|
264
266
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
265
|
-
color: data.content.box.color.mobile,
|
|
267
|
+
color: (_e = (_d = data.content.box) === null || _d === void 0 ? void 0 : _d.color) === null || _e === void 0 ? void 0 : _e.mobile,
|
|
266
268
|
size: 24,
|
|
267
269
|
type: "icon-search2"
|
|
268
|
-
})), data.content && data.content.icon.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
270
|
+
})), data.content && ((_f = data.content.icon) === null || _f === void 0 ? void 0 : _f.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
269
271
|
className: "message-wrap"
|
|
270
272
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
271
|
-
color: data.content.icon.color.mobile,
|
|
273
|
+
color: (_h = (_g = data.content.icon) === null || _g === void 0 ? void 0 : _g.color) === null || _h === void 0 ? void 0 : _h.mobile,
|
|
272
274
|
onClick: function onClick() {
|
|
273
275
|
return (0, _coreUtil.clickUrl)('/message-center');
|
|
274
276
|
},
|
|
@@ -276,7 +278,7 @@ function (_super) {
|
|
|
276
278
|
type: "icon-ChatDots"
|
|
277
279
|
}), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
278
280
|
className: "num"
|
|
279
|
-
}, messageNum))), data.content && data.content.logo.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
281
|
+
}, messageNum))), data.content && ((_j = data.content.logo) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
280
282
|
data: data.content.logo,
|
|
281
283
|
style: {
|
|
282
284
|
height: 30
|
|
@@ -69,6 +69,8 @@ var _ImageTextSecondConfig = _interopRequireDefault(require("../composite-comp/b
|
|
|
69
69
|
|
|
70
70
|
var _CarouselSecondConfig = _interopRequireDefault(require("../composite-comp/bol/second-config-panels/CarouselSecondConfig"));
|
|
71
71
|
|
|
72
|
+
var _ImageGallerySecondConfig = _interopRequireDefault(require("../composite-comp/bol/second-config-panels/ImageGallerySecondConfig"));
|
|
73
|
+
|
|
72
74
|
var _RecommendSecondConfig = _interopRequireDefault(require("../composite-comp/dito/second-config-panels/RecommendSecondConfig"));
|
|
73
75
|
|
|
74
76
|
var _MobileNavigationSecondConfig = _interopRequireDefault(require("../composite-comp/dito/second-config-panels/MobileNavigationSecondConfig"));
|
|
@@ -99,5 +101,5 @@ var configPanelMap = (_b = {}, _b[_Banner["default"].type] = _BannerConfig["defa
|
|
|
99
101
|
*/
|
|
100
102
|
|
|
101
103
|
exports.configPanelMap = configPanelMap;
|
|
102
|
-
var secondConfigPanelMap = (_c = {}, _c[_Banner["default"].type] = _BannerSecondConfig["default"], _c[_Text["default"].type] = _TextSecondConfig["default"], _c[_ImageText["default"].type] = _ImageTextSecondConfig["default"], _c[_Recommend["default"].type] = _RecommendSecondConfig["default"], _c[_MobileNavigation["default"].type] = _MobileNavigationSecondConfig["default"], _c[_PcNavigation["default"].type] = _PcNavigationSecondConfig["default"], _c[_Carousel["default"].type] = _CarouselSecondConfig["default"], _c[_Tag["default"].type] = _TagSecondConfig["default"], _c[_Button["default"].type] = _ButtonSecondConfig["default"], _c);
|
|
104
|
+
var secondConfigPanelMap = (_c = {}, _c[_Banner["default"].type] = _BannerSecondConfig["default"], _c[_Text["default"].type] = _TextSecondConfig["default"], _c[_ImageText["default"].type] = _ImageTextSecondConfig["default"], _c[_Recommend["default"].type] = _RecommendSecondConfig["default"], _c[_MobileNavigation["default"].type] = _MobileNavigationSecondConfig["default"], _c[_PcNavigation["default"].type] = _PcNavigationSecondConfig["default"], _c[_Carousel["default"].type] = _CarouselSecondConfig["default"], _c[_ImageGallery["default"].type] = _ImageGallerySecondConfig["default"], _c[_Tag["default"].type] = _TagSecondConfig["default"], _c[_Button["default"].type] = _ButtonSecondConfig["default"], _c);
|
|
103
105
|
exports.secondConfigPanelMap = secondConfigPanelMap;
|
package/es/constants/layout.js
CHANGED
|
@@ -13,8 +13,6 @@ var _imageGalleryLayout = _interopRequireDefault(require("../assets/images/layou
|
|
|
13
13
|
|
|
14
14
|
var _imageGalleryLayout2 = _interopRequireDefault(require("../assets/images/layout-icon/imageGalleryLayout2.png"));
|
|
15
15
|
|
|
16
|
-
var _imageGalleryLayout3 = _interopRequireDefault(require("../assets/images/layout-icon/imageGalleryLayout3.png"));
|
|
17
|
-
|
|
18
16
|
var _layoutImagetextM = _interopRequireDefault(require("../assets/images/layout-icon/layout-imagetext-m1-1.png"));
|
|
19
17
|
|
|
20
18
|
var _layoutImagetextM2 = _interopRequireDefault(require("../assets/images/layout-icon/layout-imagetext-m1-2.png"));
|
|
@@ -55,6 +53,7 @@ var _layoutNavigationNormal = _interopRequireDefault(require("../assets/images/l
|
|
|
55
53
|
|
|
56
54
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
57
55
|
|
|
56
|
+
// import imageGalleryLayout3 from '../assets/images/layout-icon/imageGalleryLayout3.png';
|
|
58
57
|
// import p3 from '../assets/images/layout-icon/layout-imagetext-p3.png';
|
|
59
58
|
var dividerLayout = [{
|
|
60
59
|
id: 'layout1',
|
|
@@ -76,10 +75,6 @@ var imageGalleryLayout = [{
|
|
|
76
75
|
id: 'layout2',
|
|
77
76
|
name: 'layout2',
|
|
78
77
|
image: _imageGalleryLayout2["default"]
|
|
79
|
-
}, {
|
|
80
|
-
id: 'layout3',
|
|
81
|
-
name: 'layout3',
|
|
82
|
-
image: _imageGalleryLayout3["default"]
|
|
83
78
|
}];
|
|
84
79
|
exports.imageGalleryLayout = imageGalleryLayout;
|
|
85
80
|
var carouselLayout = [{
|
package/es/locale/en/en.json
CHANGED
package/es/locale/es/es.json
CHANGED
package/es/locale/id/id.json
CHANGED
|
@@ -19,6 +19,8 @@ var _coreUtil = require("../../../../../utils/coreUtil");
|
|
|
19
19
|
|
|
20
20
|
var _AlignSelector = require("../../../../../common/AlignSelector");
|
|
21
21
|
|
|
22
|
+
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
23
|
+
|
|
22
24
|
var _components = require("../../../../../meta-comp/components");
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -171,7 +173,9 @@ function (_super) {
|
|
|
171
173
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
172
174
|
className: "m-banner-mobile",
|
|
173
175
|
style: {
|
|
174
|
-
marginBottom:
|
|
176
|
+
marginBottom: (0, _commonUtil.ensure)(function () {
|
|
177
|
+
return data.spacing.mobile.marginBottom;
|
|
178
|
+
}, 0)
|
|
175
179
|
}
|
|
176
180
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Carousel, {
|
|
177
181
|
ref: this.carouselRef,
|
|
@@ -238,7 +238,7 @@ function (_super) {
|
|
|
238
238
|
className: "content",
|
|
239
239
|
style: {
|
|
240
240
|
width: contentWidth - spacing.paddingLeft - spacing.paddingRight,
|
|
241
|
-
paddingBottom: data.setting.dots.open ? '20px' : '0'
|
|
241
|
+
paddingBottom: data.setting.dots.open && data.groupSource.length / colNum > 1 ? '20px' : '0'
|
|
242
242
|
}
|
|
243
243
|
}, /*#__PURE__*/_react["default"].createElement(_reactSlick["default"], _extends({
|
|
244
244
|
ref: function ref(slider) {
|
|
@@ -231,7 +231,7 @@ function (_super) {
|
|
|
231
231
|
className: "content",
|
|
232
232
|
style: {
|
|
233
233
|
width: contentWidth - spacing.paddingLeft - spacing.paddingRight,
|
|
234
|
-
paddingBottom: data.setting.dots.open ? '30px' : '0'
|
|
234
|
+
paddingBottom: data.setting.dots.open && data.groupSource.length / colNum > 1 ? '30px' : '0'
|
|
235
235
|
}
|
|
236
236
|
}, data.setting.navigation.open && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
237
237
|
className: "carousel-icon-left",
|
|
@@ -22,8 +22,8 @@ var imagesGroupSourceJSON = function imagesGroupSourceJSON() {
|
|
|
22
22
|
open: true,
|
|
23
23
|
type: 'IMAGE',
|
|
24
24
|
content: {
|
|
25
|
-
h5Name: '
|
|
26
|
-
pcName: '
|
|
25
|
+
h5Name: 'Image Name',
|
|
26
|
+
pcName: 'Image Name',
|
|
27
27
|
h5ImgSrc: '',
|
|
28
28
|
pcImgSrc: '',
|
|
29
29
|
clickUrl: ''
|
|
@@ -60,7 +60,13 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
60
60
|
},
|
|
61
61
|
customize: {
|
|
62
62
|
layout: 'layout1',
|
|
63
|
-
align: 'left'
|
|
63
|
+
align: 'left',
|
|
64
|
+
pcRowNum: 2,
|
|
65
|
+
rowNum: 2,
|
|
66
|
+
mobileMinRowNum: 2,
|
|
67
|
+
mobileMaxRowNum: 5,
|
|
68
|
+
pcMinRowNum: 2,
|
|
69
|
+
pcMaxRowNum: 6
|
|
64
70
|
},
|
|
65
71
|
background: {
|
|
66
72
|
opacity: 100,
|
|
@@ -7,9 +7,11 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
10
12
|
require("./index.less");
|
|
11
13
|
|
|
12
|
-
var
|
|
14
|
+
var _components = require("../../../../../meta-comp/components");
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
17
|
|
|
@@ -39,6 +41,34 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
39
41
|
};
|
|
40
42
|
}();
|
|
41
43
|
|
|
44
|
+
var MOBILE_IMG_SIZE = {
|
|
45
|
+
1: {
|
|
46
|
+
maxW: 343,
|
|
47
|
+
maxH: 258,
|
|
48
|
+
gap: 12
|
|
49
|
+
},
|
|
50
|
+
2: {
|
|
51
|
+
maxW: 165,
|
|
52
|
+
maxH: 124,
|
|
53
|
+
gap: 12
|
|
54
|
+
},
|
|
55
|
+
3: {
|
|
56
|
+
maxW: 106,
|
|
57
|
+
maxH: 80,
|
|
58
|
+
gap: 12
|
|
59
|
+
},
|
|
60
|
+
4: {
|
|
61
|
+
maxW: 77,
|
|
62
|
+
maxH: 56,
|
|
63
|
+
gap: 12
|
|
64
|
+
},
|
|
65
|
+
5: {
|
|
66
|
+
maxW: 62,
|
|
67
|
+
maxH: 45,
|
|
68
|
+
gap: 8
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
42
72
|
var ImageGalleryMobile =
|
|
43
73
|
/** @class */
|
|
44
74
|
function (_super) {
|
|
@@ -48,27 +78,35 @@ function (_super) {
|
|
|
48
78
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
49
79
|
|
|
50
80
|
_this.state = {};
|
|
51
|
-
_this.carouselRef = /*#__PURE__*/_react["default"].createRef();
|
|
52
|
-
_this.destroy = null;
|
|
53
81
|
return _this;
|
|
54
82
|
}
|
|
55
83
|
|
|
56
|
-
ImageGalleryMobile.prototype.componentDidMount = function () {
|
|
57
|
-
this.destroy = (0, _mobx.autorun)(function () {// this.init(this.props.data.groupSource);
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
ImageGalleryMobile.prototype.componentWillReceiveProps = function (nextProps) {// this.init(nextProps.data.groupSource);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
ImageGalleryMobile.prototype.componentWillUnmount = function () {// this.destroy();
|
|
65
|
-
};
|
|
66
|
-
|
|
67
84
|
ImageGalleryMobile.prototype.render = function () {
|
|
68
85
|
var data = this.props.data;
|
|
86
|
+
var isHorizontal = data.customize.layout === 'layout2';
|
|
87
|
+
var colNum = isHorizontal ? data.customize.rowNum : 1;
|
|
69
88
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
89
|
className: "m-image-gallery-mobile"
|
|
71
|
-
}, "
|
|
90
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
|
+
className: (0, _classnames["default"])('content', {
|
|
92
|
+
horizontal: isHorizontal
|
|
93
|
+
}),
|
|
94
|
+
style: {
|
|
95
|
+
gap: MOBILE_IMG_SIZE[colNum].gap
|
|
96
|
+
}
|
|
97
|
+
}, data.groupSource.map(function (m) {
|
|
98
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
99
|
+
key: m.id,
|
|
100
|
+
className: "img-wrap",
|
|
101
|
+
style: {
|
|
102
|
+
width: MOBILE_IMG_SIZE[colNum].maxW
|
|
103
|
+
}
|
|
104
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
105
|
+
data: m.image,
|
|
106
|
+
maxHeight: MOBILE_IMG_SIZE[colNum].maxH,
|
|
107
|
+
maxWidth: MOBILE_IMG_SIZE[colNum].maxW
|
|
108
|
+
}));
|
|
109
|
+
})));
|
|
72
110
|
};
|
|
73
111
|
|
|
74
112
|
ImageGalleryMobile.defaultProps = {
|
|
@@ -1,73 +1,21 @@
|
|
|
1
|
-
.m-
|
|
2
|
-
|
|
3
|
-
// .turnPage {
|
|
4
|
-
// position: absolute;
|
|
5
|
-
// top: 50%;
|
|
6
|
-
// transform: translateY(-50%);
|
|
7
|
-
// z-index: 3;
|
|
8
|
-
// cursor: pointer;
|
|
9
|
-
// }
|
|
10
|
-
// .leftBtn {
|
|
11
|
-
// left: 20px;
|
|
12
|
-
// }
|
|
13
|
-
// .rightBtn {
|
|
14
|
-
// right: 20px;
|
|
15
|
-
// }
|
|
1
|
+
.m-image-gallery-mobile {
|
|
2
|
+
overflow-x: auto;
|
|
16
3
|
|
|
17
|
-
.
|
|
18
|
-
height: 386px;
|
|
19
|
-
position: relative;
|
|
4
|
+
.content {
|
|
20
5
|
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
width: 345px;
|
|
9
|
+
margin: 0 auto;
|
|
21
10
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
position: relative;
|
|
25
|
-
z-index: 2;
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
margin-bottom: auto;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.title {
|
|
32
|
-
margin-bottom: 8px;
|
|
11
|
+
&.horizontal {
|
|
12
|
+
flex-direction: row;
|
|
33
13
|
}
|
|
34
14
|
|
|
35
|
-
.
|
|
36
|
-
margin-bottom: 20px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.btn-wrap {
|
|
15
|
+
.img-wrap {
|
|
40
16
|
display: flex;
|
|
41
17
|
align-items: center;
|
|
42
|
-
justify-content:
|
|
43
|
-
|
|
44
|
-
.btn {
|
|
45
|
-
margin-right: 12px;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.swiper-ban {
|
|
51
|
-
position: absolute;
|
|
52
|
-
width: 100%;
|
|
53
|
-
bottom: 10px;
|
|
54
|
-
display: flex;
|
|
55
|
-
align-items: center;
|
|
56
|
-
justify-content: center;
|
|
57
|
-
|
|
58
|
-
.ban {
|
|
59
|
-
font-size: 16px;
|
|
60
|
-
width: 1.5em;
|
|
61
|
-
height: 0.3em;
|
|
62
|
-
background: #FFF;
|
|
63
|
-
cursor: inherit;
|
|
64
|
-
margin-right: 0.3em;
|
|
65
|
-
transition: all .5s;
|
|
66
|
-
|
|
67
|
-
&.active {
|
|
68
|
-
width: 1.5em;
|
|
69
|
-
opacity: 1;
|
|
70
|
-
}
|
|
18
|
+
justify-content: center;
|
|
71
19
|
}
|
|
72
20
|
}
|
|
73
21
|
}
|
|
@@ -21,6 +21,8 @@ var _defaultImg = _interopRequireDefault(require("../imgs/defaultImg.png"));
|
|
|
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); }
|
|
@@ -110,7 +112,7 @@ function (_super) {
|
|
|
110
112
|
src: ((0, _coreUtil.isPc)() ? src.image.content.pcImgSrc : src.image.content.h5ImgSrc) || _defaultImg["default"]
|
|
111
113
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
114
|
className: "name"
|
|
113
|
-
}, src.
|
|
115
|
+
}, (0, _coreUtil.isPc)() ? src.image.content.pcName : src.image.content.h5Name));
|
|
114
116
|
};
|
|
115
117
|
|
|
116
118
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -138,7 +140,7 @@ function (_super) {
|
|
|
138
140
|
AComponent.defaultProps = {
|
|
139
141
|
source: []
|
|
140
142
|
};
|
|
141
|
-
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
|
|
143
|
+
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], AComponent);
|
|
142
144
|
return AComponent;
|
|
143
145
|
}(_react["default"].Component);
|
|
144
146
|
|
|
@@ -30,7 +30,7 @@ function ImageGalleryConfig(props) {
|
|
|
30
30
|
headerSize: "large",
|
|
31
31
|
source: [{
|
|
32
32
|
key: '1',
|
|
33
|
-
name: (0, _locale.i18n)('
|
|
33
|
+
name: (0, _locale.i18n)('IMAGES'),
|
|
34
34
|
value: /*#__PURE__*/_react["default"].createElement(_ImageGalleryConfigImageGroup["default"], {
|
|
35
35
|
source: data.groupSource
|
|
36
36
|
})
|
|
@@ -41,14 +41,15 @@ function ImageGalleryConfig(props) {
|
|
|
41
41
|
data: data.spacing
|
|
42
42
|
})
|
|
43
43
|
}, {
|
|
44
|
-
key: '
|
|
44
|
+
key: '3',
|
|
45
45
|
name: (0, _locale.i18n)('CUSTOMIZE'),
|
|
46
46
|
value: /*#__PURE__*/_react["default"].createElement(_CustomizeConfig["default"], {
|
|
47
|
+
component: "imageGallery",
|
|
47
48
|
data: data.customize,
|
|
48
49
|
layoutSource: _layout.imageGalleryLayout
|
|
49
50
|
})
|
|
50
51
|
}, {
|
|
51
|
-
key: '
|
|
52
|
+
key: '4',
|
|
52
53
|
name: (0, _locale.i18n)('BACKGROUND'),
|
|
53
54
|
value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
|
|
54
55
|
data: data.background
|
|
@@ -7,10 +7,6 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _locale = require("../../../../locale");
|
|
11
|
-
|
|
12
|
-
var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
|
|
13
|
-
|
|
14
10
|
var _ImageConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ImageConfig"));
|
|
15
11
|
|
|
16
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -55,20 +51,13 @@ function (_super) {
|
|
|
55
51
|
|
|
56
52
|
ImageGallerySecondConfig.prototype.render = function () {
|
|
57
53
|
var panelProps = this.props.panelProps;
|
|
58
|
-
console.log('panelProps...', panelProps);
|
|
59
54
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
60
|
-
className: "image_gallery_second_conf_wrap"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
name: (0, _locale.i18n)('IMAGE'),
|
|
67
|
-
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
68
|
-
data: panelProps.image
|
|
69
|
-
}),
|
|
70
|
-
metaOption: panelProps.image
|
|
71
|
-
}]
|
|
55
|
+
className: "image_gallery_second_conf_wrap",
|
|
56
|
+
style: {
|
|
57
|
+
marginTop: '20px'
|
|
58
|
+
}
|
|
59
|
+
}, /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
60
|
+
data: panelProps.image
|
|
72
61
|
}));
|
|
73
62
|
};
|
|
74
63
|
|
|
@@ -91,21 +91,12 @@ function (_super) {
|
|
|
91
91
|
showRowNum: true
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
-
_this.
|
|
94
|
+
_this.onInit = function (v) {
|
|
95
95
|
var _a;
|
|
96
96
|
|
|
97
97
|
var _b = _this.props,
|
|
98
|
-
selectedLayoutFun = _b.selectedLayoutFun,
|
|
99
|
-
data = _b.data,
|
|
100
98
|
component = _b.component,
|
|
101
|
-
id = _b.id;
|
|
102
|
-
|
|
103
|
-
if (selectedLayoutFun) {
|
|
104
|
-
selectedLayoutFun(v);
|
|
105
|
-
} else {
|
|
106
|
-
data.layout = v;
|
|
107
|
-
} // 轮播组件特殊处理
|
|
108
|
-
|
|
99
|
+
id = _b.id; // 轮播组件特殊处理
|
|
109
100
|
|
|
110
101
|
if (component === 'carousel') {
|
|
111
102
|
if (v === 'layout2') {
|
|
@@ -136,6 +127,19 @@ function (_super) {
|
|
|
136
127
|
});
|
|
137
128
|
}
|
|
138
129
|
}
|
|
130
|
+
} // imageGallery 第二种布局可选列数
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
if (component === 'imageGallery') {
|
|
134
|
+
if (v === 'layout2') {
|
|
135
|
+
_this.setState({
|
|
136
|
+
showRowNum: true
|
|
137
|
+
});
|
|
138
|
+
} else {
|
|
139
|
+
_this.setState({
|
|
140
|
+
showRowNum: false
|
|
141
|
+
});
|
|
142
|
+
}
|
|
139
143
|
} // 移动端导航特殊处理
|
|
140
144
|
// 更改需求,两个布局都需 可选行数
|
|
141
145
|
// if (component == 'mobileNavigation') {
|
|
@@ -146,6 +150,20 @@ function (_super) {
|
|
|
146
150
|
// }
|
|
147
151
|
// }
|
|
148
152
|
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
_this.layoutChange = function (v) {
|
|
156
|
+
var _a = _this.props,
|
|
157
|
+
selectedLayoutFun = _a.selectedLayoutFun,
|
|
158
|
+
data = _a.data;
|
|
159
|
+
|
|
160
|
+
if (selectedLayoutFun) {
|
|
161
|
+
selectedLayoutFun(v);
|
|
162
|
+
} else {
|
|
163
|
+
data.layout = v;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
_this.onInit(v);
|
|
149
167
|
|
|
150
168
|
_this.selfRender(); // this.setState({});
|
|
151
169
|
|
|
@@ -169,15 +187,7 @@ function (_super) {
|
|
|
169
187
|
CustomizeConfig.prototype.componentDidMount = function () {
|
|
170
188
|
var _a;
|
|
171
189
|
|
|
172
|
-
|
|
173
|
-
this.setState({
|
|
174
|
-
showRowNum: false
|
|
175
|
-
});
|
|
176
|
-
} else {
|
|
177
|
-
this.setState({
|
|
178
|
-
showRowNum: true
|
|
179
|
-
});
|
|
180
|
-
}
|
|
190
|
+
this.onInit((_a = this.props.data) === null || _a === void 0 ? void 0 : _a.layout);
|
|
181
191
|
};
|
|
182
192
|
|
|
183
193
|
CustomizeConfig.prototype.render = function () {
|
|
@@ -232,6 +232,8 @@ function (_super) {
|
|
|
232
232
|
};
|
|
233
233
|
|
|
234
234
|
SearchMobile.prototype.render = function () {
|
|
235
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
236
|
+
|
|
235
237
|
var data = this.props.data;
|
|
236
238
|
console.log('----search ', data);
|
|
237
239
|
var messageNum = this.state.messageNum; // let styleWrap = {};
|
|
@@ -253,22 +255,22 @@ function (_super) {
|
|
|
253
255
|
className: "m-search-bar"
|
|
254
256
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
255
257
|
className: "right"
|
|
256
|
-
}, data.content && data.content.box.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
258
|
+
}, data.content && ((_a = data.content.box) === null || _a === void 0 ? void 0 : _a.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
257
259
|
className: "search-input-wrap",
|
|
258
260
|
onClick: function onClick() {
|
|
259
261
|
return (0, _coreUtil.clickUrl)('/search-page');
|
|
260
262
|
},
|
|
261
263
|
style: {
|
|
262
|
-
borderColor: data.content.box.color.mobile
|
|
264
|
+
borderColor: (_c = (_b = data.content.box) === null || _b === void 0 ? void 0 : _b.color) === null || _c === void 0 ? void 0 : _c.mobile
|
|
263
265
|
}
|
|
264
266
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
265
|
-
color: data.content.box.color.mobile,
|
|
267
|
+
color: (_e = (_d = data.content.box) === null || _d === void 0 ? void 0 : _d.color) === null || _e === void 0 ? void 0 : _e.mobile,
|
|
266
268
|
size: 24,
|
|
267
269
|
type: "icon-search2"
|
|
268
|
-
})), data.content && data.content.icon.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
270
|
+
})), data.content && ((_f = data.content.icon) === null || _f === void 0 ? void 0 : _f.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
269
271
|
className: "message-wrap"
|
|
270
272
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
271
|
-
color: data.content.icon.color.mobile,
|
|
273
|
+
color: (_h = (_g = data.content.icon) === null || _g === void 0 ? void 0 : _g.color) === null || _h === void 0 ? void 0 : _h.mobile,
|
|
272
274
|
onClick: function onClick() {
|
|
273
275
|
return (0, _coreUtil.clickUrl)('/message-center');
|
|
274
276
|
},
|
|
@@ -276,7 +278,7 @@ function (_super) {
|
|
|
276
278
|
type: "icon-ChatDots"
|
|
277
279
|
}), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
278
280
|
className: "num"
|
|
279
|
-
}, messageNum))), data.content && data.content.logo.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
281
|
+
}, messageNum))), data.content && ((_j = data.content.logo) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
280
282
|
data: data.content.logo,
|
|
281
283
|
style: {
|
|
282
284
|
height: 30
|
|
@@ -69,6 +69,8 @@ var _ImageTextSecondConfig = _interopRequireDefault(require("../composite-comp/b
|
|
|
69
69
|
|
|
70
70
|
var _CarouselSecondConfig = _interopRequireDefault(require("../composite-comp/bol/second-config-panels/CarouselSecondConfig"));
|
|
71
71
|
|
|
72
|
+
var _ImageGallerySecondConfig = _interopRequireDefault(require("../composite-comp/bol/second-config-panels/ImageGallerySecondConfig"));
|
|
73
|
+
|
|
72
74
|
var _RecommendSecondConfig = _interopRequireDefault(require("../composite-comp/dito/second-config-panels/RecommendSecondConfig"));
|
|
73
75
|
|
|
74
76
|
var _MobileNavigationSecondConfig = _interopRequireDefault(require("../composite-comp/dito/second-config-panels/MobileNavigationSecondConfig"));
|
|
@@ -99,5 +101,5 @@ var configPanelMap = (_b = {}, _b[_Banner["default"].type] = _BannerConfig["defa
|
|
|
99
101
|
*/
|
|
100
102
|
|
|
101
103
|
exports.configPanelMap = configPanelMap;
|
|
102
|
-
var secondConfigPanelMap = (_c = {}, _c[_Banner["default"].type] = _BannerSecondConfig["default"], _c[_Text["default"].type] = _TextSecondConfig["default"], _c[_ImageText["default"].type] = _ImageTextSecondConfig["default"], _c[_Recommend["default"].type] = _RecommendSecondConfig["default"], _c[_MobileNavigation["default"].type] = _MobileNavigationSecondConfig["default"], _c[_PcNavigation["default"].type] = _PcNavigationSecondConfig["default"], _c[_Carousel["default"].type] = _CarouselSecondConfig["default"], _c[_Tag["default"].type] = _TagSecondConfig["default"], _c[_Button["default"].type] = _ButtonSecondConfig["default"], _c);
|
|
104
|
+
var secondConfigPanelMap = (_c = {}, _c[_Banner["default"].type] = _BannerSecondConfig["default"], _c[_Text["default"].type] = _TextSecondConfig["default"], _c[_ImageText["default"].type] = _ImageTextSecondConfig["default"], _c[_Recommend["default"].type] = _RecommendSecondConfig["default"], _c[_MobileNavigation["default"].type] = _MobileNavigationSecondConfig["default"], _c[_PcNavigation["default"].type] = _PcNavigationSecondConfig["default"], _c[_Carousel["default"].type] = _CarouselSecondConfig["default"], _c[_ImageGallery["default"].type] = _ImageGallerySecondConfig["default"], _c[_Tag["default"].type] = _TagSecondConfig["default"], _c[_Button["default"].type] = _ButtonSecondConfig["default"], _c);
|
|
103
105
|
exports.secondConfigPanelMap = secondConfigPanelMap;
|
package/lib/constants/layout.js
CHANGED
|
@@ -13,8 +13,6 @@ var _imageGalleryLayout = _interopRequireDefault(require("../assets/images/layou
|
|
|
13
13
|
|
|
14
14
|
var _imageGalleryLayout2 = _interopRequireDefault(require("../assets/images/layout-icon/imageGalleryLayout2.png"));
|
|
15
15
|
|
|
16
|
-
var _imageGalleryLayout3 = _interopRequireDefault(require("../assets/images/layout-icon/imageGalleryLayout3.png"));
|
|
17
|
-
|
|
18
16
|
var _layoutImagetextM = _interopRequireDefault(require("../assets/images/layout-icon/layout-imagetext-m1-1.png"));
|
|
19
17
|
|
|
20
18
|
var _layoutImagetextM2 = _interopRequireDefault(require("../assets/images/layout-icon/layout-imagetext-m1-2.png"));
|
|
@@ -55,6 +53,7 @@ var _layoutNavigationNormal = _interopRequireDefault(require("../assets/images/l
|
|
|
55
53
|
|
|
56
54
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
57
55
|
|
|
56
|
+
// import imageGalleryLayout3 from '../assets/images/layout-icon/imageGalleryLayout3.png';
|
|
58
57
|
// import p3 from '../assets/images/layout-icon/layout-imagetext-p3.png';
|
|
59
58
|
var dividerLayout = [{
|
|
60
59
|
id: 'layout1',
|
|
@@ -76,10 +75,6 @@ var imageGalleryLayout = [{
|
|
|
76
75
|
id: 'layout2',
|
|
77
76
|
name: 'layout2',
|
|
78
77
|
image: _imageGalleryLayout2["default"]
|
|
79
|
-
}, {
|
|
80
|
-
id: 'layout3',
|
|
81
|
-
name: 'layout3',
|
|
82
|
-
image: _imageGalleryLayout3["default"]
|
|
83
78
|
}];
|
|
84
79
|
exports.imageGalleryLayout = imageGalleryLayout;
|
|
85
80
|
var carouselLayout = [{
|
package/lib/locale/en/en.json
CHANGED
package/lib/locale/es/es.json
CHANGED
package/lib/locale/id/id.json
CHANGED