@fonixtree/magic-design 0.0.83 → 0.0.85

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.
Files changed (75) hide show
  1. package/es/assets/less/button.less +23 -0
  2. package/es/assets/less/datepicker.less +11 -0
  3. package/es/assets/less/index.less +2 -1
  4. package/es/composite-comp/bol/components/Banner/mobile/index.js +5 -1
  5. package/es/composite-comp/bol/components/Carousel/mobile/index.js +1 -1
  6. package/es/composite-comp/bol/components/Carousel/pc/index.js +18 -14
  7. package/es/composite-comp/bol/components/ImageGallery/defaultJSON.js +13 -4
  8. package/es/composite-comp/bol/components/ImageGallery/index.js +5 -1
  9. package/es/composite-comp/bol/components/ImageGallery/mobile/index.js +53 -15
  10. package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +11 -63
  11. package/es/composite-comp/bol/components/ImageGallery/pc/index.js +138 -0
  12. package/es/composite-comp/bol/components/ImageGallery/pc/index.less +21 -0
  13. package/es/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +4 -2
  14. package/es/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +20 -4
  15. package/es/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +6 -17
  16. package/es/composite-comp/common/components/ProductItem/index.less +0 -1
  17. package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +30 -20
  18. package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +0 -12
  19. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +1 -0
  20. package/es/composite-comp/dito/components/FlashDeal/pc/index.js +0 -42
  21. package/es/composite-comp/dito/components/FlashDeal/pc/index.less +1 -0
  22. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +8 -6
  23. package/es/constants/component-types.js +3 -1
  24. package/es/constants/index.js +1 -0
  25. package/es/constants/layout.js +1 -6
  26. package/es/core/Designer/AppointmentModal/index.js +83 -0
  27. package/es/core/Designer/AppointmentModal/index.less +10 -0
  28. package/es/core/Designer/ConfigPanel/index.js +1 -0
  29. package/es/core/Designer/QuickMenuBar/index.js +34 -2
  30. package/es/core/Designer/QuickMenuBar/index.less +34 -0
  31. package/es/core/Designer/ViewArea/index.js +32 -2
  32. package/es/core/Designer/ViewArea/index.less +29 -0
  33. package/es/core/Designer/index.js +44 -4
  34. package/es/decorator/metaDecorator.js +1 -1
  35. package/es/locale/en/en.json +5 -0
  36. package/es/locale/es/es.json +5 -0
  37. package/es/locale/id/id.json +5 -0
  38. package/lib/assets/less/button.less +23 -0
  39. package/lib/assets/less/datepicker.less +11 -0
  40. package/lib/assets/less/index.less +2 -1
  41. package/lib/composite-comp/bol/components/Banner/mobile/index.js +5 -1
  42. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +1 -1
  43. package/lib/composite-comp/bol/components/Carousel/pc/index.js +18 -14
  44. package/lib/composite-comp/bol/components/ImageGallery/defaultJSON.js +13 -4
  45. package/lib/composite-comp/bol/components/ImageGallery/index.js +5 -1
  46. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.js +53 -15
  47. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +11 -63
  48. package/lib/composite-comp/bol/components/ImageGallery/pc/index.js +138 -0
  49. package/lib/composite-comp/bol/components/ImageGallery/pc/index.less +21 -0
  50. package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +4 -2
  51. package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +20 -4
  52. package/lib/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +6 -17
  53. package/lib/composite-comp/common/components/ProductItem/index.less +0 -1
  54. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +30 -20
  55. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +0 -12
  56. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +1 -0
  57. package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +0 -42
  58. package/lib/composite-comp/dito/components/FlashDeal/pc/index.less +1 -0
  59. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +8 -6
  60. package/lib/constants/component-types.js +3 -1
  61. package/lib/constants/index.js +1 -0
  62. package/lib/constants/layout.js +1 -6
  63. package/lib/core/Designer/AppointmentModal/index.js +83 -0
  64. package/lib/core/Designer/AppointmentModal/index.less +10 -0
  65. package/lib/core/Designer/ConfigPanel/index.js +1 -0
  66. package/lib/core/Designer/QuickMenuBar/index.js +34 -2
  67. package/lib/core/Designer/QuickMenuBar/index.less +34 -0
  68. package/lib/core/Designer/ViewArea/index.js +32 -2
  69. package/lib/core/Designer/ViewArea/index.less +29 -0
  70. package/lib/core/Designer/index.js +44 -4
  71. package/lib/decorator/metaDecorator.js +1 -1
  72. package/lib/locale/en/en.json +5 -0
  73. package/lib/locale/es/es.json +5 -0
  74. package/lib/locale/id/id.json +5 -0
  75. package/package.json +1 -1
@@ -27,6 +27,8 @@ var _ViewArea = _interopRequireDefault(require("./ViewArea"));
27
27
 
28
28
  var _History = _interopRequireDefault(require("./History"));
29
29
 
30
+ var _AppointmentModal = _interopRequireDefault(require("./AppointmentModal"));
31
+
30
32
  var _componentTypes = require("../../constants/component-types");
31
33
 
32
34
  var _mobx = require("../../mobx");
@@ -317,6 +319,8 @@ function (_super) {
317
319
  });
318
320
  };
319
321
 
322
+ console.log(code);
323
+
320
324
  switch (code) {
321
325
  case _constants.quickMenuCode.UNDO:
322
326
  _this.history.undo(callback);
@@ -332,6 +336,13 @@ function (_super) {
332
336
  onPublish(handleParams);
333
337
  break;
334
338
 
339
+ case _constants.quickMenuCode.PUBLISH_LATER:
340
+ _this.setState({
341
+ appointmentVisible: true
342
+ });
343
+
344
+ break;
345
+
335
346
  case _constants.quickMenuCode.PREVIEW:
336
347
  onPreviews(handleParams);
337
348
  break;
@@ -362,6 +373,22 @@ function (_super) {
362
373
  });
363
374
  };
364
375
 
376
+ _this.onAppointmentConfirm = function (date) {
377
+ var onPublish = _this.props.onPublish;
378
+ var _a = _this.state,
379
+ device = _a.device,
380
+ MPageData = _a.MPageData;
381
+ var handleParams = {
382
+ pageData: {
383
+ id: (0, _uuid.v4)(),
384
+ childNodes: MPageData
385
+ },
386
+ device: device,
387
+ appointmentDete: date
388
+ };
389
+ onPublish(handleParams);
390
+ };
391
+
365
392
  var pageData = props.pageData,
366
393
  config = props.config,
367
394
  locale = props.locale;
@@ -378,7 +405,8 @@ function (_super) {
378
405
 
379
406
  _this.state = {
380
407
  MPageData: MPageData,
381
- device: _constants.deviceTypeMap.PHONE
408
+ device: _constants.deviceTypeMap.PHONE,
409
+ appointmentVisible: false
382
410
  };
383
411
  setDesignConfig(config);
384
412
  return _this;
@@ -440,11 +468,13 @@ function (_super) {
440
468
 
441
469
  var _a = this.state,
442
470
  MPageData = _a.MPageData,
443
- device = _a.device;
471
+ device = _a.device,
472
+ appointmentVisible = _a.appointmentVisible;
444
473
  var _b = this.props,
445
474
  pagesManager = _b.pagesManager,
446
475
  compSource = _b.compSource,
447
- pageName = _b.pageName;
476
+ pageName = _b.pageName,
477
+ onCancelPublish = _b.onCancelPublish;
448
478
  return /*#__PURE__*/_react["default"].createElement(_mobxReact.Provider, {
449
479
  store: _mobx.store
450
480
  }, /*#__PURE__*/_react["default"].createElement(_antd.ConfigProvider, {
@@ -475,10 +505,20 @@ function (_super) {
475
505
  pageData: MPageData
476
506
  }), /*#__PURE__*/_react["default"].createElement(_ViewArea["default"] // ref={this.viewAreaRef}
477
507
  , {
508
+ appointmentDate: this.props.appointmentDate,
478
509
  device: device,
510
+ onCancelPublish: onCancelPublish,
479
511
  pageData: MPageData,
480
512
  renderHeader: this.renderHeader
481
- })))));
513
+ })), /*#__PURE__*/_react["default"].createElement(_AppointmentModal["default"], {
514
+ onClose: function onClose() {
515
+ return _this.setState({
516
+ appointmentVisible: false
517
+ });
518
+ },
519
+ onConfirm: this.onAppointmentConfirm,
520
+ visible: appointmentVisible
521
+ }))));
482
522
  };
483
523
 
484
524
  return Designer;
@@ -143,7 +143,7 @@ function metaDecorator(WrappedComponent) {
143
143
  var style = {
144
144
  boxSizing: 'border-box',
145
145
  height: '100%',
146
- border: '1px solid transparent'
146
+ border: 'none'
147
147
  };
148
148
 
149
149
  if (window.magicDesign.mode === 'renderer') {
@@ -1,4 +1,9 @@
1
1
  {
2
+ "IMAGES": "Images",
3
+ "PUBLISH_TIME": "Publish Time",
4
+ "CONFIRM": "Confirm",
5
+ "PUBLISH_LATER": "Publish Later",
6
+ "PUBLISH_NOW": "Publish Now",
2
7
  "SEARCH_BOX": "Search Box",
3
8
  "PLEASE_INPUT_KEYWORDS": "Please input keywords",
4
9
  "SHOPPING_CART": "Shopping Cart",
@@ -1,4 +1,9 @@
1
1
  {
2
+ "IMAGES": "Images",
3
+ "PUBLISH_TIME": "Publish Time",
4
+ "CONFIRM": "Confirm",
5
+ "PUBLISH_LATER": "Publish Later",
6
+ "PUBLISH_NOW": "Publish Now",
2
7
  "SEARCH_BOX": "Search Box",
3
8
  "PLEASE_INPUT_KEYWORDS": "Please input keywords",
4
9
  "SHOPPING_CART": "Shopping Cart",
@@ -1,4 +1,9 @@
1
1
  {
2
+ "IMAGES": "Images",
3
+ "PUBLISH_TIME": "Publish Time",
4
+ "CONFIRM": "Confirm",
5
+ "PUBLISH_LATER": "Publish Later",
6
+ "PUBLISH_NOW": "Publish Now",
2
7
  "SEARCH_BOX": "Search Box",
3
8
  "PLEASE_INPUT_KEYWORDS": "Please input keywords",
4
9
  "SHOPPING_CART": "Shopping Cart",
@@ -6,4 +6,27 @@
6
6
  &.ant-btn-sm {
7
7
  height: @small !important;
8
8
  }
9
+ &.ant-btn-primary {
10
+ background-color: #2F54EB !important;
11
+ border-color:#2F54EB !important;
12
+ &:hover {
13
+ background-color: #1D39C4 !important;
14
+ border-color:#1D39C4 !important;
15
+ }
16
+ }
17
+ &.ant-btn-default {
18
+ &:hover {
19
+ border-color:#1D39C4 !important;
20
+ color:#1D39C4 !important;
21
+ }
22
+ }
23
+ &.ant-btn-light {
24
+ border: none;
25
+ background-color: #E9F0FF;
26
+ color: #2F54EB;
27
+ &:hover {
28
+ background-color: #D6E4FF;
29
+ color: #2F54EB;
30
+ }
31
+ }
9
32
  }
@@ -0,0 +1,11 @@
1
+ .ant-picker {
2
+ &:hover {
3
+ border-color: #2F54EB !important;
4
+ }
5
+ &.ant-picker-focused {
6
+ border-color: #2F54EB !important;
7
+ }
8
+ }
9
+ .ant-picker-time-panel-column > li.ant-picker-time-panel-cell-selected .ant-picker-time-panel-cell-inner {
10
+ background-color: #E9F0FF !important;
11
+ }
@@ -9,4 +9,5 @@
9
9
  @import './modal.less';
10
10
  @import './input.less';
11
11
  @import './button.less';
12
- @import './form.less';
12
+ @import './form.less';
13
+ @import './datepicker.less';
@@ -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: data.spacing.mobile.marginBottom || 0
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) {
@@ -29,14 +29,10 @@ require("slick-carousel/slick/slick.css");
29
29
 
30
30
  require("slick-carousel/slick/slick-theme.css");
31
31
 
32
- var _ref, _ref2, _ref3, _ref4;
33
-
34
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
35
33
 
36
34
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
37
35
 
38
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
39
-
40
36
  var __extends = void 0 && (void 0).__extends || function () {
41
37
  var _extendStatics = function extendStatics(d, b) {
42
38
  _extendStatics = Object.setPrototypeOf || {
@@ -73,19 +69,27 @@ var PC_IMG_SIZE = [{
73
69
  maxW: 524,
74
70
  minH: 150,
75
71
  maxH: 524
76
- }, (_ref = {
72
+ }, {
77
73
  minW: 100,
78
- maxW: 341
79
- }, _defineProperty(_ref, "minW", 100), _defineProperty(_ref, "maxW", 341), _ref), (_ref2 = {
74
+ maxW: 341,
75
+ minH: 100,
76
+ maxH: 341
77
+ }, {
80
78
  minW: 100,
81
- maxW: 251
82
- }, _defineProperty(_ref2, "minW", 100), _defineProperty(_ref2, "maxW", 251), _ref2), (_ref3 = {
79
+ maxW: 251,
80
+ minH: 100,
81
+ maxH: 251
82
+ }, {
83
83
  minW: 100,
84
- maxW: 195
85
- }, _defineProperty(_ref3, "minW", 100), _defineProperty(_ref3, "maxW", 195), _ref3), (_ref4 = {
84
+ maxW: 195,
85
+ minH: 100,
86
+ maxH: 195
87
+ }, {
86
88
  minW: 100,
87
- maxW: 168
88
- }, _defineProperty(_ref4, "minW", 100), _defineProperty(_ref4, "maxW", 168), _ref4)];
89
+ maxW: 168,
90
+ minH: 100,
91
+ maxH: 168
92
+ }];
89
93
 
90
94
  var CarouselPc =
91
95
  /** @class */
@@ -231,7 +235,7 @@ function (_super) {
231
235
  className: "content",
232
236
  style: {
233
237
  width: contentWidth - spacing.paddingLeft - spacing.paddingRight,
234
- paddingBottom: data.setting.dots.open ? '30px' : '0'
238
+ paddingBottom: data.setting.dots.open && data.groupSource.length / colNum > 1 ? '30px' : '0'
235
239
  }
236
240
  }, data.setting.navigation.open && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
237
241
  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: 'name2',
26
- pcName: 'name2',
25
+ h5Name: 'Image Name',
26
+ pcName: 'Image Name',
27
27
  h5ImgSrc: '',
28
28
  pcImgSrc: '',
29
29
  clickUrl: ''
@@ -59,8 +59,17 @@ var getDefaultJSON = function getDefaultJSON() {
59
59
  }
60
60
  },
61
61
  customize: {
62
- layout: 'layout1',
63
- align: 'left'
62
+ layout: {
63
+ h5Layout: 'layout1',
64
+ pcLayout: 'layout1'
65
+ },
66
+ align: 'left',
67
+ pcRowNum: 2,
68
+ rowNum: 2,
69
+ mobileMinRowNum: 2,
70
+ mobileMaxRowNum: 5,
71
+ pcMinRowNum: 2,
72
+ pcMaxRowNum: 6
64
73
  },
65
74
  background: {
66
75
  opacity: 100,
@@ -7,6 +7,8 @@ exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
 
10
+ var _pc = _interopRequireDefault(require("./pc"));
11
+
10
12
  var _mobile = _interopRequireDefault(require("./mobile"));
11
13
 
12
14
  var _defaultJSON = require("./defaultJSON");
@@ -68,7 +70,9 @@ function (_super) {
68
70
 
69
71
  ImageGallery.prototype.render = function () {
70
72
  var nodeData = this.props.nodeData;
71
- return /*#__PURE__*/_react["default"].createElement("div", null, window.magicDesign.device === 'pc' ? null : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
73
+ return /*#__PURE__*/_react["default"].createElement("div", null, window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
74
+ data: nodeData
75
+ }) : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
72
76
  data: nodeData
73
77
  }));
74
78
  };
@@ -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 _mobx = require("../../../../../mobx");
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.h5Layout === '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
- }, "image gallery");
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-banner-mobile {
2
- position: relative;
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
- .carouselItem {
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
- .carouseContent {
23
- padding: 80px 28px 0;
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
- .sub-title {
36
- margin-bottom: 20px;
37
- }
38
-
39
- .btn-wrap {
15
+ .img-wrap {
40
16
  display: flex;
41
17
  align-items: center;
42
- justify-content: flex-start;
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
  }
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
12
+ require("./index.less");
13
+
14
+ var _components = require("../../../../../meta-comp/components");
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
+
18
+ var __extends = void 0 && (void 0).__extends || function () {
19
+ var _extendStatics = function extendStatics(d, b) {
20
+ _extendStatics = Object.setPrototypeOf || {
21
+ __proto__: []
22
+ } instanceof Array && function (d, b) {
23
+ d.__proto__ = b;
24
+ } || function (d, b) {
25
+ for (var p in b) {
26
+ if (b.hasOwnProperty(p)) d[p] = b[p];
27
+ }
28
+ };
29
+
30
+ return _extendStatics(d, b);
31
+ };
32
+
33
+ return function (d, b) {
34
+ _extendStatics(d, b);
35
+
36
+ function __() {
37
+ this.constructor = d;
38
+ }
39
+
40
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41
+ };
42
+ }();
43
+
44
+ var PC_IMG_SIZE = {
45
+ 1: {
46
+ minW: 150,
47
+ maxW: '100%',
48
+ minH: 150,
49
+ maxH: 960,
50
+ gap: 20
51
+ },
52
+ 2: {
53
+ minW: 150,
54
+ maxW: 628,
55
+ minH: 150,
56
+ maxH: 471,
57
+ gap: 24
58
+ },
59
+ 3: {
60
+ minW: 100,
61
+ maxW: 410,
62
+ minH: 100,
63
+ maxH: 308,
64
+ gap: 24
65
+ },
66
+ 4: {
67
+ minW: 100,
68
+ maxW: 302,
69
+ minH: 100,
70
+ maxH: 227,
71
+ gap: 24
72
+ },
73
+ 5: {
74
+ minW: 100,
75
+ maxW: 236,
76
+ minH: 100,
77
+ maxH: 177,
78
+ gap: 24
79
+ },
80
+ 6: {
81
+ minW: 100,
82
+ maxW: 193,
83
+ minH: 100,
84
+ maxH: 145,
85
+ gap: 24
86
+ }
87
+ };
88
+
89
+ var ImageGalleryPc =
90
+ /** @class */
91
+ function (_super) {
92
+ __extends(ImageGalleryPc, _super);
93
+
94
+ function ImageGalleryPc() {
95
+ var _this = _super !== null && _super.apply(this, arguments) || this;
96
+
97
+ _this.state = {};
98
+ return _this;
99
+ }
100
+
101
+ ImageGalleryPc.prototype.render = function () {
102
+ var data = this.props.data;
103
+ var isHorizontal = data.customize.layout.pcLayout === 'layout2';
104
+ var colNum = isHorizontal ? data.customize.pcRowNum : 1;
105
+ return /*#__PURE__*/_react["default"].createElement("div", {
106
+ className: "m-image-gallery-pc"
107
+ }, /*#__PURE__*/_react["default"].createElement("div", {
108
+ className: (0, _classnames["default"])('content', {
109
+ horizontal: isHorizontal
110
+ }),
111
+ style: {
112
+ gap: PC_IMG_SIZE[colNum].gap
113
+ }
114
+ }, data.groupSource.map(function (m) {
115
+ return /*#__PURE__*/_react["default"].createElement("div", {
116
+ key: m.id,
117
+ className: "img-wrap",
118
+ style: {
119
+ width: PC_IMG_SIZE[colNum].maxW
120
+ }
121
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
122
+ data: m.image,
123
+ maxHeight: PC_IMG_SIZE[colNum].maxH,
124
+ maxWidth: PC_IMG_SIZE[colNum].maxW
125
+ }));
126
+ })));
127
+ };
128
+
129
+ ImageGalleryPc.defaultProps = {
130
+ data: {
131
+ groupSource: []
132
+ }
133
+ };
134
+ return ImageGalleryPc;
135
+ }(_react["default"].Component);
136
+
137
+ var _default = ImageGalleryPc;
138
+ exports["default"] = _default;
@@ -0,0 +1,21 @@
1
+ .m-image-gallery-pc {
2
+ overflow-x: auto;
3
+
4
+ .content {
5
+ display: flex;
6
+ flex-direction: column;
7
+ flex-wrap: wrap;
8
+ width: 1280px;
9
+ margin: 0 auto;
10
+
11
+ &.horizontal {
12
+ flex-direction: row;
13
+ }
14
+
15
+ .img-wrap {
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ }
20
+ }
21
+ }