@fonixtree/magic-design 0.0.26 → 0.0.28
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/README.md +311 -0
- package/es/assets/fonts/.DS_Store +0 -0
- package/es/assets/less/modal.less +1 -1
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +6 -4
- package/es/composite-comp/bol/components/Carousel/mobile/index.less +9 -11
- package/es/composite-comp/bol/components/Carousel/pc/index.js +24 -15
- package/es/composite-comp/bol/components/Carousel/pc/index.less +8 -0
- package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +38 -0
- package/es/composite-comp/common/components/ProductItem/index.js +1 -1
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +17 -2
- package/es/constants/index.js +5 -1
- package/es/core/Designer/PageCompList/index.js +3 -1
- package/es/core/Designer/QuickMenuBar/index.js +58 -7
- package/es/core/Designer/QuickMenuBar/index.less +13 -4
- package/es/core/Designer/index.js +25 -3
- package/es/locale/index.js +33 -0
- package/es/meta-comp/components/Image/index.js +5 -0
- package/es/mobx/Store.js +7 -0
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/assets/less/modal.less +1 -1
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +6 -4
- package/lib/composite-comp/bol/components/Carousel/mobile/index.less +9 -11
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +24 -15
- package/lib/composite-comp/bol/components/Carousel/pc/index.less +8 -0
- package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +38 -0
- package/lib/composite-comp/common/components/ProductItem/index.js +1 -1
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +17 -2
- package/lib/constants/index.js +5 -1
- package/lib/core/Designer/PageCompList/index.js +3 -1
- package/lib/core/Designer/QuickMenuBar/index.js +58 -7
- package/lib/core/Designer/QuickMenuBar/index.less +13 -4
- package/lib/core/Designer/index.js +25 -3
- package/lib/locale/index.js +33 -0
- package/lib/meta-comp/components/Image/index.js +5 -0
- package/lib/mobx/Store.js +7 -0
- package/package.json +79 -1
package/README.md
ADDED
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
# 设计器二期
|
|
2
|
+
|
|
3
|
+
## 1、基本概念
|
|
4
|
+
|
|
5
|
+
### 1.1、元组件:构成复合组件的最小单位
|
|
6
|
+
|
|
7
|
+
Text、Image、Button、Divider、Video 等
|
|
8
|
+
|
|
9
|
+
### 1.2、复合组件:由若干个元组件构成的一个大组件
|
|
10
|
+
|
|
11
|
+
Text、Banner、Image Gallery、Image and Text、Carousel、Reward、Newsletter 等
|
|
12
|
+
|
|
13
|
+
### 1.3、业务公共组件:项目中复用的公共组件
|
|
14
|
+
|
|
15
|
+
所有的公共组件需要开放 value 和 onChange Api(除 Button、Iconfont)
|
|
16
|
+
|
|
17
|
+
Button、Iconfont、AlignSelecter、Collapse、ColorPicker、ImagePicker、LayoutSelecter、Slider、UrlPicker
|
|
18
|
+
|
|
19
|
+
## 2、元组件
|
|
20
|
+
|
|
21
|
+
### 2.1
|
|
22
|
+
|
|
23
|
+
元组件类型:
|
|
24
|
+
|
|
25
|
+
TEXT、IMAGE、BUTTON、DIVIDER、VIDEO
|
|
26
|
+
|
|
27
|
+
元组件报文格式:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
id:'xxxx' //元组件key
|
|
32
|
+
type: 'TYPE', //元组件类型
|
|
33
|
+
style:{
|
|
34
|
+
fontFamily:'xxx', //字体
|
|
35
|
+
...css //属性名称尽量使用标准css名称
|
|
36
|
+
},
|
|
37
|
+
hoverStyle:{
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
动态设置 hover 效果
|
|
44
|
+
|
|
45
|
+
onMouseEnter={e => { e.target.style.color = 'red'; }}
|
|
46
|
+
|
|
47
|
+
onMouseLeave={e => { e.target.style.color = 'white'; }}
|
|
48
|
+
|
|
49
|
+
文本可编辑
|
|
50
|
+
|
|
51
|
+
contenteditable="true"
|
|
52
|
+
|
|
53
|
+
### 2.2 、元组件报文
|
|
54
|
+
|
|
55
|
+
#### Text
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
id:'xxxx' //元组件key
|
|
60
|
+
type: 'TYPE', //元组件类型
|
|
61
|
+
content:'this is text',
|
|
62
|
+
style:{
|
|
63
|
+
fontFamily:'xxx', //字体
|
|
64
|
+
fontSize: '14px',
|
|
65
|
+
width: '200px',
|
|
66
|
+
...css
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### Image
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
id:'xxxx' //元组件key
|
|
76
|
+
type: 'IMAGE', //元组件类型
|
|
77
|
+
name:'123.png',
|
|
78
|
+
src:'../image.png', //图片地址
|
|
79
|
+
url:'www.baidu.com', //图片跳转地址
|
|
80
|
+
style:{
|
|
81
|
+
width: '200px',
|
|
82
|
+
...css
|
|
83
|
+
},
|
|
84
|
+
hoverStyle:{ //hover 类型为new时保存src,类型为enlarge时保存scale
|
|
85
|
+
scale: '2',
|
|
86
|
+
src:'../image1.png',
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
#### Button
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
id:'xxxx' //元组件key
|
|
96
|
+
type: 'BUTTON', //元组件类型
|
|
97
|
+
name:'Submit',
|
|
98
|
+
url: 'www.baidu.com',
|
|
99
|
+
style:{
|
|
100
|
+
buttonIconSrc:'../img.png',
|
|
101
|
+
buttonIconPlace: 'left',
|
|
102
|
+
color:'#FEFEFE',
|
|
103
|
+
border: '1px solid red',
|
|
104
|
+
borderRadius:'10px',
|
|
105
|
+
fontFamily:'xxx', //字体
|
|
106
|
+
fontSize: '14px',
|
|
107
|
+
...css
|
|
108
|
+
},
|
|
109
|
+
hoverStyle {
|
|
110
|
+
color:'#FEFEFE',
|
|
111
|
+
border: '1px solid red',
|
|
112
|
+
fontFamily:'xxx', //字体
|
|
113
|
+
fontSize: '14px',
|
|
114
|
+
...css
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## 2、复合组件
|
|
120
|
+
|
|
121
|
+
### 2.1
|
|
122
|
+
|
|
123
|
+
元组件类型:
|
|
124
|
+
|
|
125
|
+
TEXT、BANNER、IMAGE_GALLERT、IMAGE_TEXT、CAROUSEL、REWARD、NEWSLETTER
|
|
126
|
+
|
|
127
|
+
复合组件报文格式:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
id:'xxxx' //复合组件key
|
|
132
|
+
type: 'TYPE', //复合组件类型
|
|
133
|
+
setting:{ //开关类型的配置及属性配置放在这里
|
|
134
|
+
autoplays: 3, //3秒轮播
|
|
135
|
+
},
|
|
136
|
+
groupSource:[], //元组件集合组数据放在这里
|
|
137
|
+
metas:{
|
|
138
|
+
title:{
|
|
139
|
+
open:false,
|
|
140
|
+
type:'IMAGE'
|
|
141
|
+
...metaCompJson
|
|
142
|
+
},
|
|
143
|
+
subTitle:{
|
|
144
|
+
open:false,
|
|
145
|
+
type:'IMAGE'
|
|
146
|
+
...metaCompJson
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
customize:{
|
|
150
|
+
layout:'',
|
|
151
|
+
background:{
|
|
152
|
+
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
#### Text
|
|
159
|
+
|
|
160
|
+
```js
|
|
161
|
+
{
|
|
162
|
+
id: 'xxxx', //复合组件key
|
|
163
|
+
type: 'TEXT', //复合组件类型
|
|
164
|
+
setting:{
|
|
165
|
+
layout:'left', // 模块布局 left/center/right ,每一个layout可能都是一个不同的组件
|
|
166
|
+
title:{
|
|
167
|
+
type:'TEXT'
|
|
168
|
+
...metaCompJson
|
|
169
|
+
},
|
|
170
|
+
subtitle:{
|
|
171
|
+
type:'TEXT'
|
|
172
|
+
...metaCompJson
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
source:[
|
|
176
|
+
{ //此处可以抽出业务组件
|
|
177
|
+
title:{
|
|
178
|
+
type:'TEXT'
|
|
179
|
+
...metaCompJson
|
|
180
|
+
},
|
|
181
|
+
content:{
|
|
182
|
+
type:'TEXT'
|
|
183
|
+
...metaCompJson
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
style:{
|
|
188
|
+
align:'left', //文本布局 left/center/right
|
|
189
|
+
backgroundColor: 'red',
|
|
190
|
+
backgroundImage:'../image.png'
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
#### Banner
|
|
196
|
+
|
|
197
|
+
modifySetting
|
|
198
|
+
|
|
199
|
+
```json
|
|
200
|
+
{
|
|
201
|
+
"comositeId": "1111",
|
|
202
|
+
|
|
203
|
+
"value": {
|
|
204
|
+
"autoplays": 4
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
id: 'xxxx',
|
|
212
|
+
type: 'BANNER',
|
|
213
|
+
setting:{
|
|
214
|
+
open:false
|
|
215
|
+
autoplays: 3, //3秒轮播
|
|
216
|
+
arrows:{ // 滚动箭头
|
|
217
|
+
open:false,
|
|
218
|
+
color:'red',
|
|
219
|
+
size:'',
|
|
220
|
+
hoverSize:'',
|
|
221
|
+
hoverColor:'green',
|
|
222
|
+
},
|
|
223
|
+
dots:{ //面板指示点
|
|
224
|
+
open:false,
|
|
225
|
+
color: 'red',
|
|
226
|
+
size:'',
|
|
227
|
+
hoverSize:''
|
|
228
|
+
hoverColor:'green',
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
groupSource:[
|
|
232
|
+
{ //此处可以作为一个业务组件
|
|
233
|
+
id:'xxxxx',
|
|
234
|
+
image:{
|
|
235
|
+
open:false,
|
|
236
|
+
type:'IMAGE'
|
|
237
|
+
...metaCompJson
|
|
238
|
+
},
|
|
239
|
+
title:{
|
|
240
|
+
open:false,
|
|
241
|
+
type:'TEXT',
|
|
242
|
+
...metaCompJson
|
|
243
|
+
},
|
|
244
|
+
content:{
|
|
245
|
+
open:false,
|
|
246
|
+
type:'TEXT',
|
|
247
|
+
...metaCompJson
|
|
248
|
+
},
|
|
249
|
+
button:{
|
|
250
|
+
type:'BUTTON',
|
|
251
|
+
...metaCompJson
|
|
252
|
+
},
|
|
253
|
+
secondaryButton:{
|
|
254
|
+
type:'BUTTON',
|
|
255
|
+
...metaCompJson
|
|
256
|
+
},
|
|
257
|
+
layout:'center',
|
|
258
|
+
align:'left',
|
|
259
|
+
//文本布局 left/center/right
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
#### Image Gallery
|
|
266
|
+
|
|
267
|
+
```json
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
#### Image and Text
|
|
272
|
+
|
|
273
|
+
```json
|
|
274
|
+
{
|
|
275
|
+
id:'xxxx'
|
|
276
|
+
type: 'IMAGE_TEXT',
|
|
277
|
+
setting:{
|
|
278
|
+
layout:'left',
|
|
279
|
+
title:{},
|
|
280
|
+
subtitle:{},
|
|
281
|
+
button:{},
|
|
282
|
+
secondaryButton:{}
|
|
283
|
+
},
|
|
284
|
+
source:[
|
|
285
|
+
|
|
286
|
+
],
|
|
287
|
+
style:{
|
|
288
|
+
align:'left',
|
|
289
|
+
backgroundColor:'red',
|
|
290
|
+
backgroundImage:'./img.png'
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
疑问:
|
|
296
|
+
|
|
297
|
+
Text 元组件
|
|
298
|
+
|
|
299
|
+
文字链接配置好之后,怎么删除
|
|
300
|
+
|
|
301
|
+
链接配置的规则,按单词还是字符
|
|
302
|
+
|
|
303
|
+
image 元组件
|
|
304
|
+
|
|
305
|
+
属性控制进度条和输入框是否要限制最大最小值
|
|
306
|
+
|
|
307
|
+
button 元组件
|
|
308
|
+
|
|
309
|
+
是否需要 icon 的 hover 效果
|
|
310
|
+
|
|
311
|
+
banner 中的 text Align 放在元组件里?
|
|
Binary file
|
|
@@ -73,11 +73,11 @@ var MOBILE_IMG_SIZE = [{
|
|
|
73
73
|
w: 282,
|
|
74
74
|
h: 212
|
|
75
75
|
}, {
|
|
76
|
-
w:
|
|
76
|
+
w: 135,
|
|
77
77
|
h: 102
|
|
78
78
|
}, {
|
|
79
|
-
w:
|
|
80
|
-
h:
|
|
79
|
+
w: 86,
|
|
80
|
+
h: 65
|
|
81
81
|
}, {
|
|
82
82
|
w: 60,
|
|
83
83
|
h: 45
|
|
@@ -168,6 +168,8 @@ function (_super) {
|
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
+
var spacing = data.spacing[window.magicDesign.device];
|
|
172
|
+
if (spacing.contentWidth) bgStyle.width = spacing.contentWidth;
|
|
171
173
|
var settings = {
|
|
172
174
|
className: 'slider-wrap',
|
|
173
175
|
arrows: false,
|
|
@@ -199,7 +201,7 @@ function (_super) {
|
|
|
199
201
|
key: item.id,
|
|
200
202
|
className: "img-wrap"
|
|
201
203
|
}, item.image.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
202
|
-
className: "
|
|
204
|
+
className: "img"
|
|
203
205
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
204
206
|
data: item.image,
|
|
205
207
|
isBackground: true,
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
.m-carousel-mobile {
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
|
-
|
|
5
|
-
.carousel-icon-left {
|
|
6
|
-
float: left;
|
|
7
|
-
margin-left: 15px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.carousel-icon-right {
|
|
11
|
-
float: right;
|
|
12
|
-
margin-right: 15px;
|
|
13
|
-
}
|
|
4
|
+
margin: 0 auto;
|
|
14
5
|
|
|
15
6
|
.slider-wrap {
|
|
16
|
-
width:
|
|
7
|
+
width: 100%;
|
|
17
8
|
padding: 30px 0;
|
|
18
9
|
margin: 0 auto;
|
|
19
10
|
|
|
20
11
|
.img-wrap {
|
|
12
|
+
.img {
|
|
13
|
+
width: fit-content;
|
|
14
|
+
height: fit-content;
|
|
15
|
+
display: block;
|
|
16
|
+
margin: 0 auto;
|
|
17
|
+
}
|
|
18
|
+
|
|
21
19
|
.title {
|
|
22
20
|
display: flex;
|
|
23
21
|
justify-content: center;
|
|
@@ -56,23 +56,29 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
56
56
|
}();
|
|
57
57
|
|
|
58
58
|
var PC_IMG_SIZE = [{
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
minW: 806,
|
|
60
|
+
maxW: 1072,
|
|
61
|
+
maxH: 662
|
|
61
62
|
}, {
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
minW: 390,
|
|
64
|
+
maxW: 524,
|
|
65
|
+
maxH: 393
|
|
64
66
|
}, {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
minW: 258,
|
|
68
|
+
maxW: 341,
|
|
69
|
+
maxH: 256
|
|
67
70
|
}, {
|
|
68
|
-
|
|
69
|
-
|
|
71
|
+
minW: 184,
|
|
72
|
+
maxW: 251,
|
|
73
|
+
maxH: 188
|
|
70
74
|
}, {
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
minW: 142,
|
|
76
|
+
maxW: 195,
|
|
77
|
+
maxH: 147
|
|
73
78
|
}, {
|
|
74
|
-
|
|
75
|
-
|
|
79
|
+
minW: 124,
|
|
80
|
+
maxW: 168,
|
|
81
|
+
maxH: 126
|
|
76
82
|
}];
|
|
77
83
|
|
|
78
84
|
var CarouselPc =
|
|
@@ -147,6 +153,8 @@ function (_super) {
|
|
|
147
153
|
};
|
|
148
154
|
}
|
|
149
155
|
|
|
156
|
+
var spacing = data.spacing[window.magicDesign.device];
|
|
157
|
+
if (spacing.contentWidth) bgStyle.width = spacing.contentWidth;
|
|
150
158
|
var settings = {
|
|
151
159
|
className: 'slider-wrap',
|
|
152
160
|
arrows: false,
|
|
@@ -187,12 +195,13 @@ function (_super) {
|
|
|
187
195
|
key: item.id,
|
|
188
196
|
className: "img-wrap"
|
|
189
197
|
}, item.image.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
190
|
-
className: "
|
|
198
|
+
className: "img"
|
|
191
199
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
192
200
|
data: item.image,
|
|
193
201
|
isBackground: true,
|
|
194
|
-
maxHeight: PC_IMG_SIZE[colNum - 1].
|
|
195
|
-
maxWidth: PC_IMG_SIZE[colNum - 1].
|
|
202
|
+
maxHeight: PC_IMG_SIZE[colNum - 1].maxH,
|
|
203
|
+
maxWidth: PC_IMG_SIZE[colNum - 1].maxW,
|
|
204
|
+
minWidth: PC_IMG_SIZE[colNum - 1].minW
|
|
196
205
|
})), showText && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, item.title.open && !((0, _coreUtil.isPc)() && item.title.pcText === '') && /*#__PURE__*/_react["default"].createElement("div", {
|
|
197
206
|
className: "title"
|
|
198
207
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.m-carousel-pc {
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
|
+
margin: 0 auto;
|
|
4
5
|
|
|
5
6
|
.carousel-icon-left {
|
|
6
7
|
float: left;
|
|
@@ -18,6 +19,13 @@
|
|
|
18
19
|
margin: 0 auto;
|
|
19
20
|
|
|
20
21
|
.img-wrap {
|
|
22
|
+
.img {
|
|
23
|
+
width: fit-content;
|
|
24
|
+
height: fit-content;
|
|
25
|
+
display: block;
|
|
26
|
+
margin: 0 auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
21
29
|
.title {
|
|
22
30
|
display: flex;
|
|
23
31
|
justify-content: center;
|
|
@@ -7,6 +7,8 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _lodash = require("lodash");
|
|
11
|
+
|
|
10
12
|
var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
|
|
11
13
|
|
|
12
14
|
var _ImageConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ImageConfig"));
|
|
@@ -49,6 +51,22 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
49
51
|
};
|
|
50
52
|
}();
|
|
51
53
|
|
|
54
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
55
|
+
__assign = Object.assign || function (t) {
|
|
56
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
57
|
+
s = arguments[i];
|
|
58
|
+
|
|
59
|
+
for (var p in s) {
|
|
60
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return t;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return __assign.apply(this, arguments);
|
|
68
|
+
};
|
|
69
|
+
|
|
52
70
|
var ImageTextSecondConfig =
|
|
53
71
|
/** @class */
|
|
54
72
|
function (_super) {
|
|
@@ -112,6 +130,25 @@ function (_super) {
|
|
|
112
130
|
})));
|
|
113
131
|
};
|
|
114
132
|
|
|
133
|
+
_this.resetHover = function () {
|
|
134
|
+
var panelProps = _this.props.panelProps;
|
|
135
|
+
|
|
136
|
+
if (panelProps.hover.open) {
|
|
137
|
+
var tempObj = {};
|
|
138
|
+
tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.button, ['buttonBorder', 'buttonIcon', 'buttonText', 'content', 'open', 'text']));
|
|
139
|
+
panelProps.hover.button = __assign(__assign({}, panelProps.hover.button), tempObj);
|
|
140
|
+
tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.secondButton, ['buttonBorder', 'buttonIcon', 'buttonText', 'content', 'open', 'text']));
|
|
141
|
+
panelProps.hover.secondButton = __assign(__assign({}, panelProps.hover.secondButton), tempObj);
|
|
142
|
+
tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.image, ['content', 'open']));
|
|
143
|
+
panelProps.hover.image = __assign(__assign({}, panelProps.image.secondButton), tempObj);
|
|
144
|
+
tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.text, ['content', 'open', 'spacing', 'specialContent', 'text', 'underline', 'vertical']));
|
|
145
|
+
panelProps.hover.text = __assign(__assign({}, panelProps.hover.text), tempObj);
|
|
146
|
+
tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.title, ['content', 'open', 'spacing', 'specialContent', 'text', 'underline', 'vertical']));
|
|
147
|
+
panelProps.hover.title = __assign(__assign({}, panelProps.hover.title), tempObj);
|
|
148
|
+
panelProps.hover.background = __assign(__assign({}, panelProps.hover.background), panelProps.background); // console.log(buttonTemp.buttonBorder == panelProps.button.buttonBorder);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
|
|
115
152
|
return _this;
|
|
116
153
|
}
|
|
117
154
|
|
|
@@ -122,6 +159,7 @@ function (_super) {
|
|
|
122
159
|
}, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
|
|
123
160
|
divider: "bold",
|
|
124
161
|
headerSize: "large",
|
|
162
|
+
onRefresh: this.resetHover,
|
|
125
163
|
source: [{
|
|
126
164
|
key: 'imageTextSecondConfig1',
|
|
127
165
|
name: 'Content',
|
|
@@ -110,7 +110,7 @@ function (_super) {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
var oldPrice = data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null;
|
|
113
|
-
var discount = data.discountPercent || 0;
|
|
113
|
+
var discount = Number(data.discountPercent) || 0;
|
|
114
114
|
var salePercent = Number(data.salePercent) / 100 || 0;
|
|
115
115
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
116
116
|
className: "m-product-item-wrap",
|
|
@@ -60,11 +60,25 @@ function (_super) {
|
|
|
60
60
|
|
|
61
61
|
var _a = this.props,
|
|
62
62
|
data = _a.data,
|
|
63
|
-
type = _a.type
|
|
63
|
+
type = _a.type,
|
|
64
|
+
configWidth = _a.configWidth;
|
|
64
65
|
var obj = data[window.magicDesign.device];
|
|
65
66
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
66
67
|
className: "spacing-config-container"
|
|
67
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
68
|
+
}, configWidth && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
69
|
+
title: "Width"
|
|
70
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
|
|
71
|
+
maxVal: window.magicDesign.device === 'pc' ? 1276 : 375,
|
|
72
|
+
minVal: window.magicDesign.device === 'pc' ? 1010 : 348,
|
|
73
|
+
onChange: function onChange(value) {
|
|
74
|
+
obj.contentWidth = value.count;
|
|
75
|
+
|
|
76
|
+
_this.selfRender();
|
|
77
|
+
},
|
|
78
|
+
value: {
|
|
79
|
+
count: obj.contentWidth
|
|
80
|
+
}
|
|
81
|
+
})), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
68
82
|
title: "Padding"
|
|
69
83
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
84
|
className: "padding-wrap"
|
|
@@ -130,6 +144,7 @@ function (_super) {
|
|
|
130
144
|
|
|
131
145
|
SpacingConfig.defaultProps = {
|
|
132
146
|
type: 'default',
|
|
147
|
+
configWidth: false,
|
|
133
148
|
data: {
|
|
134
149
|
pc: {
|
|
135
150
|
paddingTop: 10,
|
package/es/constants/index.js
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.urlType = exports.respCodeMap = exports.quickMenuCode = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.deviceTypeMap = exports.compInfoMap = void 0;
|
|
6
|
+
exports.urlType = exports.respCodeMap = exports.quickMenuCode = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.deviceTypeMap = exports.compInfoMap = exports.STORAGE_KEY = void 0;
|
|
7
|
+
var STORAGE_KEY = {
|
|
8
|
+
LANGUAGE: 'magicLanuage'
|
|
9
|
+
};
|
|
10
|
+
exports.STORAGE_KEY = STORAGE_KEY;
|
|
7
11
|
var urlType = {
|
|
8
12
|
PRODUCT_DETAIL: 'proDetail',
|
|
9
13
|
CATG_PROD_LIST: 'catg',
|
|
@@ -25,6 +25,8 @@ var _constants = require("../../../constants");
|
|
|
25
25
|
|
|
26
26
|
var _mobx = require("../../../mobx");
|
|
27
27
|
|
|
28
|
+
var _locale = require("../../../locale");
|
|
29
|
+
|
|
28
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
31
|
|
|
30
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -256,7 +258,7 @@ function PageCompList(_a) {
|
|
|
256
258
|
onClick: onAdd,
|
|
257
259
|
size: "large",
|
|
258
260
|
type: "light"
|
|
259
|
-
},
|
|
261
|
+
}, (0, _locale.i18n)('ADD_COMPONENT')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
260
262
|
className: "list mt16"
|
|
261
263
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
262
264
|
className: "inner-list"
|