@fonixtree/magic-design 0.0.61 → 0.0.62
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/assets/less/modal.less +7 -2
- package/es/common/ButtonIconLayout/index.less +4 -2
- package/es/common/Collapse/index.js +16 -3
- package/es/common/ImageModal/index.less +6 -1
- package/es/common/UrlPicker/index.js +6 -2
- package/es/common/UrlPicker/index.less +12 -1
- package/es/composite-comp/bol/components/Banner/mobile/index.js +3 -5
- package/es/composite-comp/bol/components/Banner/pc/index.js +3 -2
- package/es/composite-comp/bol/components/ImageText/defaultJSON.js +0 -145
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +3 -1
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +2 -2
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +8 -12
- package/es/composite-comp/dito/components/MobileNavigation/defaultJSON.js +2 -1
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +13 -3
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +3 -2
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +20 -4
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
- package/es/composite-comp/dito/components/Recommend/mobile/index.less +14 -7
- package/es/composite-comp/dito/components/Recommend/pc/index.js +4 -2
- package/es/composite-comp/dito/components/Recommend/pc/index.less +14 -7
- package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +8 -1
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +39 -29
- package/es/core/Designer/ConfigPanel/TerminalSelect/index.js +3 -3
- package/es/core/Designer/QuickMenuBar/index.js +3 -9
- package/es/core/Designer/index.js +6 -4
- package/es/decorator/metaDecorator.js +5 -3
- package/es/meta-comp/components/Button/index.less +4 -1
- package/es/meta-comp/components/Image/index.less +1 -0
- package/es/meta-comp/components/Text/index.js +8 -0
- package/es/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +12 -9
- package/es/meta-comp/config-panels/ImageConfig/index.js +4 -0
- package/es/mobx/Store.js +5 -2
- package/es/utils/coreUtil.js +1 -1
- package/lib/assets/less/modal.less +7 -2
- package/lib/common/ButtonIconLayout/index.less +4 -2
- package/lib/common/Collapse/index.js +16 -3
- package/lib/common/ImageModal/index.less +6 -1
- package/lib/common/UrlPicker/index.js +6 -2
- package/lib/common/UrlPicker/index.less +12 -1
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +3 -5
- package/lib/composite-comp/bol/components/Banner/pc/index.js +3 -2
- package/lib/composite-comp/bol/components/ImageText/defaultJSON.js +0 -145
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +3 -1
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +2 -2
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +8 -12
- package/lib/composite-comp/dito/components/MobileNavigation/defaultJSON.js +2 -1
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +13 -3
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +3 -2
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +20 -4
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
- package/lib/composite-comp/dito/components/Recommend/mobile/index.less +14 -7
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +4 -2
- package/lib/composite-comp/dito/components/Recommend/pc/index.less +14 -7
- package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +8 -1
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +39 -29
- package/lib/core/Designer/ConfigPanel/TerminalSelect/index.js +3 -3
- package/lib/core/Designer/QuickMenuBar/index.js +3 -9
- package/lib/core/Designer/index.js +6 -4
- package/lib/decorator/metaDecorator.js +5 -3
- package/lib/meta-comp/components/Button/index.less +4 -1
- package/lib/meta-comp/components/Image/index.less +1 -0
- package/lib/meta-comp/components/Text/index.js +8 -0
- package/lib/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +12 -9
- package/lib/meta-comp/config-panels/ImageConfig/index.js +4 -0
- package/lib/mobx/Store.js +5 -2
- package/lib/utils/coreUtil.js +1 -1
- package/package.json +1 -86
- package/README.md +0 -320
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
[magic_design] .ant-modal-wrap {
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
|
+
|
|
4
5
|
.ant-modal {
|
|
5
6
|
width: 100%;
|
|
6
7
|
top: 0 !important;
|
|
7
|
-
padding-bottom:
|
|
8
|
+
padding-bottom: 0px !important;
|
|
9
|
+
|
|
8
10
|
.ant-modal-content {
|
|
9
11
|
border-radius: 8px !important;
|
|
12
|
+
|
|
10
13
|
.ant-modal-header {
|
|
11
14
|
border-top-left-radius: 8px !important;
|
|
12
15
|
border-top-right-radius: 8px !important;
|
|
13
16
|
}
|
|
17
|
+
|
|
14
18
|
.ant-modal-body {
|
|
15
19
|
padding: 16px 16px 12px 16px !important;
|
|
20
|
+
max-height: 800px !important;
|
|
16
21
|
}
|
|
17
22
|
}
|
|
18
23
|
}
|
|
19
|
-
}
|
|
24
|
+
}
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
display: inline-flex;
|
|
8
8
|
align-items: center;
|
|
9
9
|
justify-content: center;
|
|
10
|
-
width: 94px;
|
|
11
|
-
height: 50px;
|
|
10
|
+
min-width: 94px;
|
|
11
|
+
min-height: 50px;
|
|
12
|
+
padding: 6px 10px;
|
|
13
|
+
box-sizing: border-box;
|
|
12
14
|
background: #FFFFFF;
|
|
13
15
|
border: 1px solid #D2D9E5;
|
|
14
16
|
border-radius: 8px;
|
|
@@ -94,8 +94,19 @@ function (_super) {
|
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
var activeItem = source.find(function (src) {
|
|
98
|
+
return src.active;
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
if (activeItem) {
|
|
102
|
+
actives.push(activeItem.key);
|
|
103
|
+
|
|
104
|
+
_this.setState({
|
|
105
|
+
activeKey: actives
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
return;
|
|
109
|
+
} else if (type === 'switch') {
|
|
99
110
|
var first = source.find(function (src) {
|
|
100
111
|
var _a;
|
|
101
112
|
|
|
@@ -324,10 +335,12 @@ function (_super) {
|
|
|
324
335
|
var _this = this;
|
|
325
336
|
|
|
326
337
|
this.distroy = (0, _mobx.autorun)(function () {
|
|
327
|
-
if (_this.props.type === 'switch'
|
|
338
|
+
if (_mobx.store.clickedMeta && _this.props.type === 'switch') {
|
|
328
339
|
_this.setState({
|
|
329
340
|
activeKey: [_mobx.store.clickedMeta]
|
|
330
341
|
});
|
|
342
|
+
} else if (_mobx.store.clickedMeta && _this.props.type === 'triangle') {
|
|
343
|
+
_this.initActive(_this.props);
|
|
331
344
|
}
|
|
332
345
|
});
|
|
333
346
|
}; // componentWillReceiveProps(nextProps) {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
.catg_tree_container {
|
|
2
|
+
.search_container {
|
|
3
|
+
margin-bottom: 15px;
|
|
4
|
+
}
|
|
5
|
+
|
|
2
6
|
.ant-tree-title {
|
|
3
7
|
max-width: 200px;
|
|
4
8
|
overflow: hidden;
|
|
@@ -13,9 +17,10 @@
|
|
|
13
17
|
display: flex;
|
|
14
18
|
flex-wrap: wrap;
|
|
15
19
|
}
|
|
20
|
+
|
|
16
21
|
.ant-upload-list-item-thumbnail {
|
|
17
22
|
img {
|
|
18
23
|
object-fit: contain;
|
|
19
24
|
}
|
|
20
25
|
}
|
|
21
|
-
}
|
|
26
|
+
}
|
|
@@ -63,10 +63,13 @@ function (_super) {
|
|
|
63
63
|
var visible = this.state.visible;
|
|
64
64
|
var _a = this.props,
|
|
65
65
|
value = _a.value,
|
|
66
|
-
_onChange = _a.onChange
|
|
66
|
+
_onChange = _a.onChange,
|
|
67
|
+
disabled = _a.disabled;
|
|
67
68
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
68
69
|
className: "m-url-picker"
|
|
69
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
|
+
}, disabled && /*#__PURE__*/_react["default"].createElement("div", {
|
|
71
|
+
className: "disabled"
|
|
72
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
73
|
className: "input-url"
|
|
71
74
|
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
72
75
|
onChange: function onChange(e) {
|
|
@@ -112,6 +115,7 @@ function (_super) {
|
|
|
112
115
|
|
|
113
116
|
UrlPicker.defaultProps = {
|
|
114
117
|
value: '',
|
|
118
|
+
disabled: false,
|
|
115
119
|
onChange: function onChange() {}
|
|
116
120
|
};
|
|
117
121
|
return UrlPicker;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
.m-url-picker {
|
|
2
|
-
|
|
2
|
+
position: relative;
|
|
3
|
+
.disabled {
|
|
4
|
+
position: absolute;
|
|
5
|
+
left: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
bottom: 0;
|
|
8
|
+
top: 0;
|
|
9
|
+
background-color: #D2D9E5;
|
|
10
|
+
z-index: 1;
|
|
11
|
+
opacity: 0.5;
|
|
12
|
+
border-radius: 8px;
|
|
13
|
+
}
|
|
3
14
|
.input-url {
|
|
4
15
|
width: 100%;
|
|
5
16
|
height: 40px;
|
|
@@ -59,8 +59,7 @@ function (_super) {
|
|
|
59
59
|
|
|
60
60
|
_this.state = {
|
|
61
61
|
carouseIndex: 0,
|
|
62
|
-
hoverState: false
|
|
63
|
-
clickedGroup: ''
|
|
62
|
+
hoverState: false
|
|
64
63
|
};
|
|
65
64
|
_this.carouselRef = /*#__PURE__*/_react["default"].createRef();
|
|
66
65
|
_this.destroy = null;
|
|
@@ -120,12 +119,11 @@ function (_super) {
|
|
|
120
119
|
var data = this.props.data;
|
|
121
120
|
var _a = this.state,
|
|
122
121
|
carouseIndex = _a.carouseIndex,
|
|
123
|
-
hoverState = _a.hoverState
|
|
124
|
-
clickedGroup = _a.clickedGroup;
|
|
122
|
+
hoverState = _a.hoverState;
|
|
125
123
|
var autoplay = data.setting.autoplay.open;
|
|
126
124
|
/** 设计器模式下 如果选中特定group 自动播放关闭 */
|
|
127
125
|
|
|
128
|
-
if ((0, _coreUtil.isDesignMode)() && clickedGroup) {
|
|
126
|
+
if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
|
|
129
127
|
autoplay = false;
|
|
130
128
|
}
|
|
131
129
|
|
|
@@ -23,6 +23,8 @@ var _AlignSelector = require("../../../../../common/AlignSelector");
|
|
|
23
23
|
|
|
24
24
|
var _common = require("../../../../../common");
|
|
25
25
|
|
|
26
|
+
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
27
|
+
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
29
|
|
|
28
30
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -125,8 +127,7 @@ function (_super) {
|
|
|
125
127
|
};
|
|
126
128
|
|
|
127
129
|
if (item.background.bgType === 'color') {
|
|
128
|
-
bgStyle.
|
|
129
|
-
bgStyle.backgroundColor = item.background.color;
|
|
130
|
+
bgStyle.backgroundColor = (0, _commonUtil.getColorRgba)(item.background.color || '#fff', item.background.opacity / 100 || 1);
|
|
130
131
|
} else {
|
|
131
132
|
bgStyle.backgroundImage = "url(" + item.background.image + ")";
|
|
132
133
|
}
|
|
@@ -363,151 +363,6 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
363
363
|
return {
|
|
364
364
|
id: (0, _uuid.v4)(),
|
|
365
365
|
type: 'IMAGE_TEXT',
|
|
366
|
-
// headline: {
|
|
367
|
-
// id: uuidv4(),
|
|
368
|
-
// open: true,
|
|
369
|
-
// type: 'TEXT',
|
|
370
|
-
// specialContent: [],
|
|
371
|
-
// text: 'Digital Maturity',
|
|
372
|
-
// content: {
|
|
373
|
-
// sizeType: 'Customize font styles',
|
|
374
|
-
// fontFamily: 'Open Sans',
|
|
375
|
-
// fontWeight: 600,
|
|
376
|
-
// fontSize: 28,
|
|
377
|
-
// color: '#232F46',
|
|
378
|
-
// width: 0,
|
|
379
|
-
// },
|
|
380
|
-
// underline: {
|
|
381
|
-
// open: false,
|
|
382
|
-
// textDecorationColor: '',
|
|
383
|
-
// textDecorationStyle: 'solid',
|
|
384
|
-
// },
|
|
385
|
-
// vertical: {
|
|
386
|
-
// },
|
|
387
|
-
// },
|
|
388
|
-
// subtitle: {
|
|
389
|
-
// id: uuidv4(),
|
|
390
|
-
// open: true,
|
|
391
|
-
// type: 'TEXT',
|
|
392
|
-
// specialContent: [],
|
|
393
|
-
// text: 'Freedom to innovate and create with ODA compliant B/OSS solutions',
|
|
394
|
-
// content: {
|
|
395
|
-
// sizeType: 'Customize font styles',
|
|
396
|
-
// fontFamily: 'Open Sans',
|
|
397
|
-
// fontWeight: 400,
|
|
398
|
-
// // textAlign: 'center',
|
|
399
|
-
// fontSize: 16,
|
|
400
|
-
// color: '#232F46',
|
|
401
|
-
// width: 0,
|
|
402
|
-
// },
|
|
403
|
-
// underline: {
|
|
404
|
-
// open: false,
|
|
405
|
-
// textDecorationColor: '',
|
|
406
|
-
// textDecorationStyle: 'solid',
|
|
407
|
-
// },
|
|
408
|
-
// vertical: {
|
|
409
|
-
// },
|
|
410
|
-
// },
|
|
411
|
-
// button: {
|
|
412
|
-
// id: uuidv4(),
|
|
413
|
-
// open: true,
|
|
414
|
-
// type: 'BUTTON',
|
|
415
|
-
// text: 'Button',
|
|
416
|
-
// content: {
|
|
417
|
-
// url: '',
|
|
418
|
-
// backgroundColor: '#2F54EB',
|
|
419
|
-
// },
|
|
420
|
-
// buttonText: {
|
|
421
|
-
// sizeType: 'Customize font styles',
|
|
422
|
-
// fontFamily: 'Open Sans',
|
|
423
|
-
// fontWeight: 600,
|
|
424
|
-
// fontSize: 14,
|
|
425
|
-
// fontStyle: 'normal',
|
|
426
|
-
// color: '#fff',
|
|
427
|
-
// },
|
|
428
|
-
// buttonBorder: {
|
|
429
|
-
// open: true,
|
|
430
|
-
// borderColor: '',
|
|
431
|
-
// borderRadius: 6,
|
|
432
|
-
// },
|
|
433
|
-
// buttonIcon: {
|
|
434
|
-
// iconUrl: '',
|
|
435
|
-
// layout: 'right',
|
|
436
|
-
// },
|
|
437
|
-
// hover: {
|
|
438
|
-
// open: false,
|
|
439
|
-
// content: {
|
|
440
|
-
// backgroundColor: '#0d39ed',
|
|
441
|
-
// },
|
|
442
|
-
// buttonText: {
|
|
443
|
-
// sizeType: 'Customize font styles',
|
|
444
|
-
// fontFamily: 'Open Sans',
|
|
445
|
-
// fontWeight: 600,
|
|
446
|
-
// fontSize: 14,
|
|
447
|
-
// fontStyle: 'normal',
|
|
448
|
-
// color: '#fff',
|
|
449
|
-
// },
|
|
450
|
-
// buttonBorder: {
|
|
451
|
-
// open: true,
|
|
452
|
-
// borderColor: '',
|
|
453
|
-
// borderRadius: 6,
|
|
454
|
-
// },
|
|
455
|
-
// buttonIcon: {
|
|
456
|
-
// iconUrl: '',
|
|
457
|
-
// layout: 'right',
|
|
458
|
-
// },
|
|
459
|
-
// },
|
|
460
|
-
// },
|
|
461
|
-
// secondButton: {
|
|
462
|
-
// id: uuidv4(),
|
|
463
|
-
// open: false,
|
|
464
|
-
// type: 'BUTTON',
|
|
465
|
-
// text: 'Button',
|
|
466
|
-
// content: {
|
|
467
|
-
// url: '',
|
|
468
|
-
// backgroundColor: '#FFFFFF',
|
|
469
|
-
// },
|
|
470
|
-
// buttonText: {
|
|
471
|
-
// sizeType: 'Customize font styles',
|
|
472
|
-
// fontFamily: 'Open Sans',
|
|
473
|
-
// fontWeight: 600,
|
|
474
|
-
// fontSize: 14,
|
|
475
|
-
// fontStyle: 'normal',
|
|
476
|
-
// color: '#2F54EB',
|
|
477
|
-
// },
|
|
478
|
-
// buttonBorder: {
|
|
479
|
-
// open: true,
|
|
480
|
-
// borderColor: '#2F54EB',
|
|
481
|
-
// borderRadius: 6,
|
|
482
|
-
// },
|
|
483
|
-
// buttonIcon: {
|
|
484
|
-
// iconUrl: '',
|
|
485
|
-
// layout: 'right',
|
|
486
|
-
// },
|
|
487
|
-
// hover: {
|
|
488
|
-
// open: false,
|
|
489
|
-
// content: {
|
|
490
|
-
// backgroundColor: '#0d39ed',
|
|
491
|
-
// },
|
|
492
|
-
// buttonText: {
|
|
493
|
-
// sizeType: 'Customize font styles',
|
|
494
|
-
// fontFamily: 'Open Sans',
|
|
495
|
-
// fontWeight: 600,
|
|
496
|
-
// fontSize: 14,
|
|
497
|
-
// fontStyle: 'normal',
|
|
498
|
-
// color: '#fff',
|
|
499
|
-
// },
|
|
500
|
-
// buttonBorder: {
|
|
501
|
-
// open: true,
|
|
502
|
-
// borderColor: '',
|
|
503
|
-
// borderRadius: 6,
|
|
504
|
-
// },
|
|
505
|
-
// buttonIcon: {
|
|
506
|
-
// iconUrl: '',
|
|
507
|
-
// layout: 'right',
|
|
508
|
-
// },
|
|
509
|
-
// },
|
|
510
|
-
// },
|
|
511
366
|
spacing: {
|
|
512
367
|
pc: {
|
|
513
368
|
paddingTop: 10,
|
package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/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); }
|
|
@@ -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
|
|
|
@@ -142,7 +142,7 @@ function (_super) {
|
|
|
142
142
|
tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.secondButton, ['buttonBorder', 'buttonIcon', 'buttonText', 'content', 'open', 'text']));
|
|
143
143
|
panelProps.hover.secondButton = __assign(__assign({}, panelProps.hover.secondButton), tempObj);
|
|
144
144
|
tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.image, ['content', 'open']));
|
|
145
|
-
panelProps.hover.image = __assign(__assign({}, panelProps.image
|
|
145
|
+
panelProps.hover.image = __assign(__assign({}, panelProps.hover.image), tempObj);
|
|
146
146
|
tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.text, ['content', 'open', 'spacing', 'specialContent', 'text', 'underline', 'vertical']));
|
|
147
147
|
panelProps.hover.text = __assign(__assign({}, panelProps.hover.text), tempObj);
|
|
148
148
|
tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.title, ['content', 'open', 'spacing', 'specialContent', 'text', 'underline', 'vertical']));
|
|
@@ -169,7 +169,7 @@ function (_super) {
|
|
|
169
169
|
}, {
|
|
170
170
|
key: 'imageTextSecondConfig2',
|
|
171
171
|
name: (0, _locale.i18n)('HOVER'),
|
|
172
|
-
value: this.getContentPanel(panelProps.hover
|
|
172
|
+
value: this.getContentPanel(panelProps.hover),
|
|
173
173
|
metaOption: panelProps.hover,
|
|
174
174
|
toggleType: 'switch'
|
|
175
175
|
}]
|
|
@@ -122,20 +122,16 @@ function (_super) {
|
|
|
122
122
|
CarouselStore: __assign(__assign({}, _mobx.store.CarouselStore), (_a = {}, _a[id] = v, _a))
|
|
123
123
|
});
|
|
124
124
|
} // 移动端导航特殊处理
|
|
125
|
+
// 更改需求,两个布局都需 可选行数
|
|
126
|
+
// if (component == 'mobileNavigation') {
|
|
127
|
+
// if (v === 'tile') {
|
|
128
|
+
// this.setState({ showRowNum: false });
|
|
129
|
+
// } else {
|
|
130
|
+
// this.setState({ showRowNum: true });
|
|
131
|
+
// }
|
|
132
|
+
// }
|
|
125
133
|
|
|
126
134
|
|
|
127
|
-
if (component == 'mobileNavigation') {
|
|
128
|
-
if (v === 'tile') {
|
|
129
|
-
_this.setState({
|
|
130
|
-
showRowNum: false
|
|
131
|
-
});
|
|
132
|
-
} else {
|
|
133
|
-
_this.setState({
|
|
134
|
-
showRowNum: true
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
135
|
_this.selfRender(); // this.setState({});
|
|
140
136
|
|
|
141
137
|
};
|
|
@@ -50,17 +50,27 @@ function (_super) {
|
|
|
50
50
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
51
51
|
|
|
52
52
|
_this.calcWidth = function (num) {
|
|
53
|
-
return (100 - (num - 1) *
|
|
53
|
+
return (100 - (num - 1) * 3) / num + "%";
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
_this.tileCalcWidth = function (num) {
|
|
57
|
+
return (100 - (num - 1) * 3) / (num + 0.5) + "%";
|
|
54
58
|
};
|
|
55
59
|
|
|
56
60
|
_this.getCardStyle = function (source, i) {
|
|
57
61
|
var data = _this.props.data;
|
|
58
62
|
var cardStyle = {};
|
|
59
|
-
cardStyle.marginRight = (1 + i) % data.customize.rowNum !== 0 ? '2%' : 0;
|
|
60
63
|
|
|
61
64
|
if (data.customize.layout === 'newline') {
|
|
62
|
-
|
|
65
|
+
if (i > data.customize.rowNum - 1) {
|
|
66
|
+
cardStyle.marginTop = 12;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
cardStyle.marginRight = (1 + i) % data.customize.rowNum !== 0 ? '3%' : 0;
|
|
63
70
|
cardStyle.width = _this.calcWidth(data.customize.rowNum);
|
|
71
|
+
} else {
|
|
72
|
+
cardStyle.marginRight = '3%';
|
|
73
|
+
cardStyle.width = _this.tileCalcWidth(data.customize.rowNum);
|
|
64
74
|
}
|
|
65
75
|
|
|
66
76
|
return cardStyle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.mobile-navigation-mobile {
|
|
2
2
|
// display: flex;
|
|
3
3
|
// flex-direction: column;
|
|
4
|
-
padding: 18px
|
|
4
|
+
padding-top: 18px;
|
|
5
5
|
.group-wrap {
|
|
6
6
|
padding: 0 20px;
|
|
7
7
|
display: flex;
|
|
@@ -29,9 +29,10 @@
|
|
|
29
29
|
overflow-x: auto;
|
|
30
30
|
flex-wrap: nowrap;
|
|
31
31
|
scroll-snap-type: x;
|
|
32
|
+
padding: 0 15px;
|
|
32
33
|
.one-card {
|
|
34
|
+
flex-shrink: 0;
|
|
33
35
|
scroll-snap-align: end;
|
|
34
|
-
min-width: 30%;
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
}
|
|
@@ -7,10 +7,11 @@ exports.recommendGroupSourceJSON = exports.getDefaultJSON = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _uuid = require("uuid");
|
|
9
9
|
|
|
10
|
-
var recommendGroupSourceJSON = function recommendGroupSourceJSON(logo, text) {
|
|
10
|
+
var recommendGroupSourceJSON = function recommendGroupSourceJSON(parentId, logo, text) {
|
|
11
11
|
var groupId = (0, _uuid.v4)();
|
|
12
12
|
return {
|
|
13
13
|
id: groupId,
|
|
14
|
+
parentId: parentId,
|
|
14
15
|
image: {
|
|
15
16
|
parentId: groupId,
|
|
16
17
|
id: (0, _uuid.v4)(),
|
|
@@ -39,6 +40,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(logo, text) {
|
|
|
39
40
|
specialContent: [],
|
|
40
41
|
text: text,
|
|
41
42
|
content: {
|
|
43
|
+
sizeType: 'Customize font styles',
|
|
42
44
|
fontFamily: 'Open Sans',
|
|
43
45
|
fontWeight: 400,
|
|
44
46
|
fontSize: 14,
|
|
@@ -52,6 +54,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(logo, text) {
|
|
|
52
54
|
vertical: {}
|
|
53
55
|
},
|
|
54
56
|
seeAll: {
|
|
57
|
+
parentId: groupId,
|
|
55
58
|
id: (0, _uuid.v4)(),
|
|
56
59
|
open: true,
|
|
57
60
|
type: 'BUTTON',
|
|
@@ -61,6 +64,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(logo, text) {
|
|
|
61
64
|
backgroundColor: '#fff'
|
|
62
65
|
},
|
|
63
66
|
buttonText: {
|
|
67
|
+
sizeType: 'Customize font styles',
|
|
64
68
|
fontFamily: 'Open Sans',
|
|
65
69
|
fontWeight: 400,
|
|
66
70
|
fontSize: 12,
|
|
@@ -98,7 +102,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(logo, text) {
|
|
|
98
102
|
intelligentValue: [],
|
|
99
103
|
maxProdNum: 10,
|
|
100
104
|
hover: {
|
|
101
|
-
open:
|
|
105
|
+
open: false,
|
|
102
106
|
image: {
|
|
103
107
|
parentId: groupId,
|
|
104
108
|
id: (0, _uuid.v4)(),
|
|
@@ -127,6 +131,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(logo, text) {
|
|
|
127
131
|
specialContent: [],
|
|
128
132
|
text: text,
|
|
129
133
|
content: {
|
|
134
|
+
sizeType: 'Customize font styles',
|
|
130
135
|
fontFamily: 'Open Sans',
|
|
131
136
|
fontWeight: 600,
|
|
132
137
|
fontSize: 14,
|
|
@@ -146,13 +151,17 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(logo, text) {
|
|
|
146
151
|
exports.recommendGroupSourceJSON = recommendGroupSourceJSON;
|
|
147
152
|
|
|
148
153
|
var getDefaultJSON = function getDefaultJSON() {
|
|
154
|
+
var groupId = (0, _uuid.v4)();
|
|
155
|
+
var contentId = (0, _uuid.v4)();
|
|
149
156
|
return {
|
|
150
|
-
id:
|
|
157
|
+
id: groupId,
|
|
151
158
|
type: 'RECOMMEND',
|
|
152
|
-
groupSource: [recommendGroupSourceJSON('', 'Tab1'), recommendGroupSourceJSON('', 'Tab2')],
|
|
159
|
+
groupSource: [recommendGroupSourceJSON(groupId, '', 'Tab1'), recommendGroupSourceJSON(groupId, '', 'Tab2')],
|
|
153
160
|
content: {
|
|
161
|
+
id: contentId,
|
|
154
162
|
label: {
|
|
155
163
|
id: (0, _uuid.v4)(),
|
|
164
|
+
contentId: contentId,
|
|
156
165
|
open: true,
|
|
157
166
|
type: 'BUTTON',
|
|
158
167
|
text: 'Button',
|
|
@@ -161,6 +170,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
161
170
|
backgroundColor: '#CE1126'
|
|
162
171
|
},
|
|
163
172
|
buttonText: {
|
|
173
|
+
sizeType: 'Customize font styles',
|
|
164
174
|
fontFamily: 'Open Sans',
|
|
165
175
|
fontWeight: 600,
|
|
166
176
|
fontSize: 8,
|
|
@@ -194,11 +204,13 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
194
204
|
},
|
|
195
205
|
productName: {
|
|
196
206
|
id: (0, _uuid.v4)(),
|
|
207
|
+
contentId: contentId,
|
|
197
208
|
open: true,
|
|
198
209
|
type: 'Text',
|
|
199
210
|
specialContent: [],
|
|
200
211
|
text: 'Flash Deal',
|
|
201
212
|
content: {
|
|
213
|
+
sizeType: 'Customize font styles',
|
|
202
214
|
fontFamily: 'Open Sans',
|
|
203
215
|
fontWeight: 700,
|
|
204
216
|
fontSize: 14,
|
|
@@ -216,11 +228,13 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
216
228
|
},
|
|
217
229
|
activityPrice: {
|
|
218
230
|
id: (0, _uuid.v4)(),
|
|
231
|
+
contentId: contentId,
|
|
219
232
|
open: true,
|
|
220
233
|
type: 'Text',
|
|
221
234
|
specialContent: [],
|
|
222
235
|
text: 'Flash Deal',
|
|
223
236
|
content: {
|
|
237
|
+
sizeType: 'Customize font styles',
|
|
224
238
|
fontFamily: 'Open Sans',
|
|
225
239
|
fontWeight: 700,
|
|
226
240
|
fontSize: 14,
|
|
@@ -238,11 +252,13 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
238
252
|
},
|
|
239
253
|
salesPrice: {
|
|
240
254
|
id: (0, _uuid.v4)(),
|
|
255
|
+
contentId: contentId,
|
|
241
256
|
open: true,
|
|
242
257
|
type: 'Text',
|
|
243
258
|
specialContent: [],
|
|
244
259
|
text: 'Flash Deal',
|
|
245
260
|
content: {
|
|
261
|
+
sizeType: 'Customize font styles',
|
|
246
262
|
fontFamily: 'Open Sans',
|
|
247
263
|
fontWeight: 500,
|
|
248
264
|
fontSize: 10,
|
|
@@ -558,7 +558,7 @@ function (_super) {
|
|
|
558
558
|
hideTabs = _a.hideTabs;
|
|
559
559
|
var bgStyle = this.getBackgroundStyle();
|
|
560
560
|
var products = this.state["products" + tabIndex] || [];
|
|
561
|
-
var isDivide = groupSource.length <=
|
|
561
|
+
var isDivide = groupSource.length <= 4;
|
|
562
562
|
var layout = panelProps.customize.layout.h5Layout;
|
|
563
563
|
|
|
564
564
|
var _seeAll = (0, _commonUtil.ensure)(function () {
|
|
@@ -636,6 +636,8 @@ function (_super) {
|
|
|
636
636
|
className: (0, _classnames["default"])('scrollContainer', {
|
|
637
637
|
pl_100: layout === 'layout5'
|
|
638
638
|
})
|
|
639
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
640
|
+
className: "productList"
|
|
639
641
|
}, products.map(function (item) {
|
|
640
642
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
641
643
|
className: "productCard"
|
|
@@ -651,7 +653,7 @@ function (_super) {
|
|
|
651
653
|
panelProps: panelProps.content,
|
|
652
654
|
showProgress: false
|
|
653
655
|
}));
|
|
654
|
-
}), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
656
|
+
})), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
655
657
|
className: "btnSeeAll",
|
|
656
658
|
data: _seeAll
|
|
657
659
|
})));
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
.tabTitle {
|
|
26
26
|
display: flex;
|
|
27
27
|
align-items: center;
|
|
28
|
-
padding: 0 24px;
|
|
28
|
+
// padding: 0 24px;
|
|
29
|
+
min-width: 80px;
|
|
29
30
|
height: 100%;
|
|
30
31
|
justify-content: center;
|
|
31
32
|
white-space: nowrap;
|
|
@@ -57,17 +58,23 @@
|
|
|
57
58
|
.scrollContainer {
|
|
58
59
|
display: flex;
|
|
59
60
|
flex-direction: row;
|
|
60
|
-
align-items:
|
|
61
|
+
align-items: center;
|
|
61
62
|
margin: 0 16px;
|
|
62
63
|
overflow-x: auto;
|
|
63
64
|
padding-bottom: 15px;
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
.productList {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: row;
|
|
69
|
+
align-items: flex-start;
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
&.pl_100 {
|
|
72
|
+
padding-left: 100px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.productCard {
|
|
76
|
+
margin-right: 12px;
|
|
77
|
+
}
|
|
71
78
|
}
|
|
72
79
|
}
|
|
73
80
|
|