@fonixtree/magic-design 2.0.8 → 2.0.10

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 (37) hide show
  1. package/es/assets/images/layout-icon/imageTextLeft.svg +6 -0
  2. package/es/assets/images/layout-icon/imageTextRight.svg +6 -0
  3. package/es/common/ImagePicker/index.js +4 -2
  4. package/es/composite-comp/bol/components/ImageText/pc/index.js +95 -3
  5. package/es/composite-comp/bol/components/ImageText/pc/index.less +32 -0
  6. package/es/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +182 -2
  7. package/es/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +114 -2
  8. package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +113 -2
  9. package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +54 -2
  10. package/es/composite-comp/dito/second-config-panels/MobileNavigationSecondConfig/index.js +68 -1
  11. package/es/constants/layout.js +12 -0
  12. package/es/core/Designer/AiImageGenerator/History/index.less +1 -4
  13. package/es/core/Designer/AiImageGenerator/index.less +4 -0
  14. package/es/core/Designer/ConfigPanel/index.js +2 -1
  15. package/es/locale/en/en.json +1 -0
  16. package/es/locale/es/es.json +1 -0
  17. package/es/locale/id/id.json +1 -0
  18. package/es/meta-comp/config-panels/ImageConfig/index.js +3 -1
  19. package/lib/assets/images/layout-icon/imageTextLeft.svg +6 -0
  20. package/lib/assets/images/layout-icon/imageTextRight.svg +6 -0
  21. package/lib/common/ImagePicker/index.js +4 -2
  22. package/lib/composite-comp/bol/components/ImageText/pc/index.js +95 -3
  23. package/lib/composite-comp/bol/components/ImageText/pc/index.less +32 -0
  24. package/lib/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +182 -2
  25. package/lib/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +114 -2
  26. package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +113 -2
  27. package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +54 -2
  28. package/lib/composite-comp/dito/second-config-panels/MobileNavigationSecondConfig/index.js +68 -1
  29. package/lib/constants/layout.js +12 -0
  30. package/lib/core/Designer/AiImageGenerator/History/index.less +1 -4
  31. package/lib/core/Designer/AiImageGenerator/index.less +4 -0
  32. package/lib/core/Designer/ConfigPanel/index.js +2 -1
  33. package/lib/locale/en/en.json +1 -0
  34. package/lib/locale/es/es.json +1 -0
  35. package/lib/locale/id/id.json +1 -0
  36. package/lib/meta-comp/config-panels/ImageConfig/index.js +3 -1
  37. package/package.json +1 -1
@@ -75,8 +75,59 @@ function (_super) {
75
75
  _this.setState({});
76
76
  };
77
77
 
78
+ _this.getImageRecommendSize = function (customize) {
79
+ var _a;
80
+
81
+ var obj = null;
82
+ console.log(customize);
83
+
84
+ if ((0, _coreUtil.isPc)()) {
85
+ switch ((_a = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _a === void 0 ? void 0 : _a.pcLayout) {
86
+ case 'layout1':
87
+ obj = {
88
+ width: 1280,
89
+ height: 600
90
+ };
91
+ break;
92
+
93
+ case 'layout2':
94
+ obj = {
95
+ width: 640,
96
+ height: 600
97
+ };
98
+ break;
99
+
100
+ case 'layout3':
101
+ obj = {
102
+ width: 410,
103
+ height: 300
104
+ };
105
+ break;
106
+
107
+ default:
108
+ obj = {
109
+ width: 440,
110
+ height: 272
111
+ };
112
+ break;
113
+ }
114
+ } else {
115
+ obj = {
116
+ width: 343,
117
+ height: 212
118
+ };
119
+ }
120
+
121
+ return obj;
122
+ };
123
+
78
124
  _this.getContentPanel = function () {
79
- var panelProps = _this.props.panelProps;
125
+ var _a = _this.props,
126
+ panelProps = _a.panelProps,
127
+ parentNode = _a.parentNode;
128
+
129
+ var size = _this.getImageRecommendSize(parentNode.customize);
130
+
80
131
  var source = [{
81
132
  key: '1',
82
133
  name: 'Overlay',
@@ -84,7 +135,8 @@ function (_super) {
84
135
  data: panelProps.overilay,
85
136
  needClickArea: false,
86
137
  needHover: false,
87
- needURL: false
138
+ needURL: false,
139
+ recommendImgSize: size
88
140
  }),
89
141
  metaOption: panelProps.overilay
90
142
  }, {
@@ -55,13 +55,80 @@ function (_super) {
55
55
 
56
56
  _this.state = {};
57
57
 
58
+ _this.getImageRecommendSize = function (customize) {
59
+ var obj = null;
60
+
61
+ switch (customize === null || customize === void 0 ? void 0 : customize.layout) {
62
+ case 'newline':
63
+ switch (customize === null || customize === void 0 ? void 0 : customize.rowNum) {
64
+ case 5:
65
+ obj = {
66
+ width: 48,
67
+ height: 48
68
+ };
69
+ break;
70
+
71
+ case 4:
72
+ obj = {
73
+ width: 52,
74
+ height: 52
75
+ };
76
+ break;
77
+
78
+ case 3:
79
+ obj = {
80
+ width: 82,
81
+ height: 82
82
+ };
83
+ break;
84
+ }
85
+
86
+ break;
87
+
88
+ case 'tile':
89
+ {
90
+ switch (customize === null || customize === void 0 ? void 0 : customize.rowNum) {
91
+ case 5:
92
+ obj = {
93
+ width: 44,
94
+ height: 44
95
+ };
96
+ break;
97
+
98
+ case 4:
99
+ obj = {
100
+ width: 52,
101
+ height: 52
102
+ };
103
+ break;
104
+
105
+ case 3:
106
+ obj = {
107
+ width: 78,
108
+ height: 78
109
+ };
110
+ break;
111
+ }
112
+
113
+ break;
114
+ }
115
+ }
116
+
117
+ return obj;
118
+ };
119
+
58
120
  _this.getContentPanel = function (data, needHover) {
121
+ var parentNode = _this.props.parentNode;
122
+
123
+ var size = _this.getImageRecommendSize(parentNode.customize);
124
+
59
125
  var source = [{
60
126
  key: 'mobileNavSecondContent1',
61
127
  name: (0, _locale.i18n)('IMAGE'),
62
128
  value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
63
129
  data: data.image,
64
- needHover: needHover
130
+ needHover: needHover,
131
+ recommendImgSize: size
65
132
  }),
66
133
  metaOption: data.image
67
134
  }, {
@@ -37,6 +37,10 @@ var _layoutImagetextP2 = _interopRequireDefault(require("../assets/images/layout
37
37
 
38
38
  var _layoutImagetextP3 = _interopRequireDefault(require("../assets/images/layout-icon/layout-imagetext-p4.png"));
39
39
 
40
+ var _imageTextLeft = _interopRequireDefault(require("../assets/images/layout-icon/imageTextLeft.svg"));
41
+
42
+ var _imageTextRight = _interopRequireDefault(require("../assets/images/layout-icon/imageTextRight.svg"));
43
+
40
44
  var _newsletter = _interopRequireDefault(require("../assets/images/layout-icon/newsletter.svg"));
41
45
 
42
46
  var _layoutRecommend = _interopRequireDefault(require("../assets/images/layout-icon/layout-recommend-1.png"));
@@ -128,6 +132,14 @@ var imageTextLayoutPc = [{
128
132
  id: 'layout3',
129
133
  name: 'center',
130
134
  image: _layoutImagetextP3["default"]
135
+ }, {
136
+ id: 'layout4',
137
+ name: 'leftImage',
138
+ image: _imageTextLeft["default"]
139
+ }, {
140
+ id: 'layout5',
141
+ name: 'rightImage',
142
+ image: _imageTextRight["default"]
131
143
  }];
132
144
  exports.imageTextLayoutPc = imageTextLayoutPc;
133
145
  var imageTextLayoutMobile = [{
@@ -6,10 +6,7 @@
6
6
  min-height: 100%;
7
7
  background-color: #FFF;
8
8
  border-radius: 4px;
9
- ::-webkit-scrollbar {
10
- width: 0;
11
- height: 0;
12
- }
9
+
13
10
  .history_header {
14
11
  font-size: 14px;
15
12
  display: flex;
@@ -1,4 +1,8 @@
1
1
  .generate_drawer {
2
+ ::-webkit-scrollbar {
3
+ width: 0;
4
+ height: 0;
5
+ }
2
6
  .dialog_head {
3
7
  display: flex;
4
8
  align-items: center;
@@ -285,7 +285,8 @@ function (_super) {
285
285
  if (panelProps) {
286
286
  var instance = Clazz ? /*#__PURE__*/_react["default"].createElement(Clazz, {
287
287
  panelProps: panelProps,
288
- outputType: outputType
288
+ outputType: outputType,
289
+ parentNode: selectedNode
289
290
  }) : null;
290
291
  return instance;
291
292
  }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "RECOMMENDED_SIZE": "Recommended Size",
2
3
  "BOLD": "Bold",
3
4
  "SEMIBOLD": "Semibold",
4
5
  "DARK": "Dark",
@@ -1,4 +1,5 @@
1
1
  {
2
+ "RECOMMENDED_SIZE": "Recommended Size",
2
3
  "BOLD": "Bold",
3
4
  "SEMIBOLD": "Semibold",
4
5
  "DARK": "Dark",
@@ -1,4 +1,5 @@
1
1
  {
2
+ "RECOMMENDED_SIZE": "Recommended Size",
2
3
  "BOLD": "Bold",
3
4
  "SEMIBOLD": "Semibold",
4
5
  "DARK": "Dark",
@@ -319,7 +319,8 @@ function (_super) {
319
319
  data = _a.data,
320
320
  needHover = _a.needHover,
321
321
  needClickArea = _a.needClickArea,
322
- needURL = _a.needURL;
322
+ needURL = _a.needURL,
323
+ recommendImgSize = _a.recommendImgSize;
323
324
  var selectImg = this.getSelectedImg(data);
324
325
 
325
326
  var ContentSetting = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.ImagePicker, {
@@ -330,6 +331,7 @@ function (_super) {
330
331
  onChange: function onChange(v, way) {
331
332
  _this.getImg(v, way);
332
333
  },
334
+ recommendImgSize: recommendImgSize,
333
335
  value: selectImg
334
336
  }), needClickArea && selectImg && /*#__PURE__*/_react["default"].createElement(_HotAreaConfig["default"], {
335
337
  imgUrl: selectImg,
@@ -0,0 +1,6 @@
1
+ <svg width="96" height="68" viewBox="0 0 96 68" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="1" y="1" width="94" height="66" rx="8" fill="#F5F6F7" stroke="#D2D9E5"/>
3
+ <path d="M53.0322 29H84.0322" stroke="#D2D9E5" stroke-width="4" stroke-linecap="round"/>
4
+ <path d="M53.0322 39H79.0322" stroke="#D2D9E5" stroke-width="4" stroke-linecap="round"/>
5
+ <rect x="11.0322" y="11" width="36" height="46" rx="2" fill="#D2D9E5"/>
6
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="96" height="68" viewBox="0 0 96 68" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="1" y="1" width="94" height="66" rx="8" fill="#F5F6F7" stroke="#D2D9E5"/>
3
+ <path d="M11 29H42" stroke="#D2D9E5" stroke-width="4" stroke-linecap="round"/>
4
+ <path d="M11 39H37" stroke="#D2D9E5" stroke-width="4" stroke-linecap="round"/>
5
+ <rect x="48" y="11" width="36" height="46" rx="2" fill="#D2D9E5"/>
6
+ </svg>
@@ -104,7 +104,9 @@ function (_super) {
104
104
 
105
105
  _this.getImagePick = function () {
106
106
  var visible = _this.state.visible;
107
- var value = _this.props.value;
107
+ var _a = _this.props,
108
+ value = _a.value,
109
+ recommendImgSize = _a.recommendImgSize;
108
110
  return /*#__PURE__*/_react["default"].createElement("div", {
109
111
  className: "m-image-picker"
110
112
  }, value ? /*#__PURE__*/_react["default"].createElement("div", {
@@ -149,7 +151,7 @@ function (_super) {
149
151
  className: "no-img"
150
152
  }, /*#__PURE__*/_react["default"].createElement("div", {
151
153
  className: "hint-txt"
152
- }, (0, _locale.i18n)('LOOKS_LIKE_YOU_DO_NOT_HAVE_ANY_IMAGES_IN_YOUR_GALLERY__CHOOSE_IMAGES_TO_FEATURE_ON_THIS_PAGE_')), /*#__PURE__*/_react["default"].createElement("div", {
154
+ }, (0, _locale.i18n)('LOOKS_LIKE_YOU_DO_NOT_HAVE_ANY_IMAGES_IN_YOUR_GALLERY__CHOOSE_IMAGES_TO_FEATURE_ON_THIS_PAGE_'), recommendImgSize && recommendImgSize.width && /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('RECOMMENDED_SIZE'), ": ", recommendImgSize.width, "*", recommendImgSize.height)), /*#__PURE__*/_react["default"].createElement("div", {
153
155
  className: "pick-btn",
154
156
  onClick: function onClick() {
155
157
  _this.setState({
@@ -111,12 +111,24 @@ function (_super) {
111
111
  _this.getCardStyle = function (source, i) {
112
112
  var data = _this.props.data;
113
113
  var cardStyle = {
114
- width: _this.calcWidth(data.customize.pcRowNum),
115
- marginRight: (1 + i) % data.customize.pcRowNum !== 0 ? '2%' : 0,
116
114
  alignItems: _AlignSelector.alignItemMap[data.customize.align],
117
115
  textAlign: data.customize.align
118
116
  };
117
+
118
+ if (data.customize.layout.pcLayout === 'leftImage' || data.customize.layout.pcLayout === 'rightImage') {
119
+ if ((data === null || data === void 0 ? void 0 : data.groupSource.length) > 1 && i != (data === null || data === void 0 ? void 0 : data.groupSource.length) - 1) {
120
+ cardStyle.marginBottom = 48;
121
+ }
122
+
123
+ cardStyle.alignItems = 'center';
124
+ } else {
125
+ cardStyle.marginRight = (1 + i) % data.customize.pcRowNum !== 0 ? '2%' : 0;
126
+ cardStyle.width = _this.calcWidth(data.customize.pcRowNum);
127
+ cardStyle.alignItems = _AlignSelector.alignItemMap[data.customize.align];
128
+ }
129
+
119
130
  var wrapStyle = (0, _businessUtil.computeStyle)(source, window.magicDesign.device);
131
+ console.log('cc wrapStyle', source, wrapStyle);
120
132
  var hoverIndex = _this.state.hoverIndex;
121
133
  var hoverStyle = {};
122
134
 
@@ -127,6 +139,86 @@ function (_super) {
127
139
  return __assign(__assign(__assign({}, cardStyle), wrapStyle), hoverStyle);
128
140
  };
129
141
 
142
+ _this.getContentStyle = function () {
143
+ var data = _this.props.data;
144
+ return {
145
+ alignItems: _AlignSelector.alignItemMap[data.customize.align]
146
+ };
147
+ };
148
+
149
+ _this.getAnotherLayout = function () {
150
+ var data = _this.props.data;
151
+ var hoverIndex = _this.state.hoverIndex;
152
+ var GAData = (0, _commonUtil.getGAData)(data);
153
+ console.log('ff--image text', data);
154
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (data === null || data === void 0 ? void 0 : data.groupSource.length) > 0 && /*#__PURE__*/_react["default"].createElement("div", {
155
+ className: "group-wrap"
156
+ }, data.groupSource.map(function (source, i) {
157
+ return /*#__PURE__*/_react["default"].createElement("div", {
158
+ key: source.id,
159
+ className: "one-card",
160
+ onMouseEnter: function onMouseEnter() {
161
+ if (source.hover.open) {
162
+ _this.setState({
163
+ hoverIndex: i
164
+ });
165
+ }
166
+ },
167
+ onMouseLeave: function onMouseLeave() {
168
+ _this.setState({
169
+ hoverIndex: -1
170
+ });
171
+ },
172
+ style: _this.getCardStyle(source, i)
173
+ }, (source.image.open && hoverIndex != i || hoverIndex == i && source.hover.image.open) && /*#__PURE__*/_react["default"].createElement("div", {
174
+ className: "card-image-wrap"
175
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
176
+ className: "card-image",
177
+ data: hoverIndex == i ? source.hover.image : source.image,
178
+ GAData: __assign(__assign({}, GAData), {
179
+ groupId: source.id,
180
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, source.id)
181
+ }),
182
+ maxWidth: 654,
183
+ minWidth: 300,
184
+ scale: 0.5
185
+ })), /*#__PURE__*/_react["default"].createElement("div", {
186
+ className: "content-wrap",
187
+ style: _this.getContentStyle()
188
+ }, (source.title.open && hoverIndex != i || hoverIndex == i && source.hover.title.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
189
+ className: "card-title",
190
+ data: hoverIndex == i ? source.hover.title : source.title,
191
+ GAData: __assign(__assign({}, GAData), {
192
+ groupId: source.id,
193
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, source.id)
194
+ })
195
+ }), (source.text.open && hoverIndex != i || hoverIndex == i && source.hover.text.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
196
+ className: "card-text",
197
+ data: hoverIndex == i ? source.hover.text : source.text,
198
+ GAData: __assign(__assign({}, GAData), {
199
+ groupId: source.id,
200
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, source.id)
201
+ })
202
+ }), /*#__PURE__*/_react["default"].createElement("div", {
203
+ className: "card-btn-wrap"
204
+ }, (source.button.open && hoverIndex != i || source.hover.button.open && hoverIndex == i) && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
205
+ className: "card-first-btn",
206
+ data: hoverIndex == i ? source.hover.button : source.button,
207
+ GAData: __assign(__assign({}, GAData), {
208
+ groupId: source.id,
209
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, source.id)
210
+ })
211
+ }), (source.secondButton.open && hoverIndex != i || source.hover.secondButton.open && hoverIndex == i) && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
212
+ className: "card-second-btn",
213
+ data: hoverIndex == i ? source.hover.secondButton : source.secondButton,
214
+ GAData: __assign(__assign({}, GAData), {
215
+ groupId: source.id,
216
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, source.id)
217
+ })
218
+ }))));
219
+ })));
220
+ };
221
+
130
222
  return _this;
131
223
  }
132
224
 
@@ -163,7 +255,7 @@ function (_super) {
163
255
  return /*#__PURE__*/_react["default"].createElement("div", {
164
256
  className: (0, _classnames["default"])('image-text-pc', data.customize.layout.pcLayout),
165
257
  style: wrapStyle
166
- }, (data === null || data === void 0 ? void 0 : data.groupSource.length) > 0 && /*#__PURE__*/_react["default"].createElement("div", {
258
+ }, data.customize.layout.pcLayout === 'leftImage' || data.customize.layout.pcLayout === 'rightImage' ? this.getAnotherLayout() : (data === null || data === void 0 ? void 0 : data.groupSource.length) > 0 && /*#__PURE__*/_react["default"].createElement("div", {
167
259
  className: "group-wrap"
168
260
  }, data.groupSource.map(function (source, i) {
169
261
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -116,3 +116,35 @@
116
116
  }
117
117
  }
118
118
  }
119
+
120
+
121
+ .leftImage .group-wrap .one-card {
122
+ flex-direction: row;
123
+ .card-image-wrap .card-image {
124
+ margin: 0 32px 0 0;
125
+ }
126
+ }
127
+ .rightImage .group-wrap .one-card {
128
+ flex-direction: row-reverse;
129
+ .card-image-wrap .card-image {
130
+ margin: 0 0 0 32px;
131
+ }
132
+ }
133
+
134
+ .leftImage, .rightImage {
135
+ padding: 48px 108px;
136
+ .group-wrap {
137
+ flex-direction: column;
138
+ .one-card {
139
+ // flex-direction: row;
140
+ .card-image-wrap {
141
+ width: fit-content;
142
+ }
143
+ .content-wrap {
144
+ flex: 1;
145
+ display: flex;
146
+ flex-direction: column;
147
+ }
148
+ }
149
+ }
150
+ }
@@ -74,11 +74,188 @@ function (_super) {
74
74
  var _this = _super !== null && _super.apply(this, arguments) || this;
75
75
 
76
76
  _this.state = {};
77
+
78
+ _this.getImageRecommendSize = function (customize) {
79
+ var obj = null;
80
+
81
+ if ((0, _coreUtil.isPc)()) {
82
+ if ((customize === null || customize === void 0 ? void 0 : customize.layout) == 'layout3') {
83
+ switch (customize === null || customize === void 0 ? void 0 : customize.pcRowNum) {
84
+ case 6:
85
+ obj = {
86
+ width: 149,
87
+ height: 120
88
+ };
89
+ break;
90
+
91
+ case 5:
92
+ obj = {
93
+ width: 183,
94
+ height: 147
95
+ };
96
+ break;
97
+
98
+ case 4:
99
+ obj = {
100
+ width: 233,
101
+ height: 188
102
+ };
103
+ break;
104
+
105
+ case 3:
106
+ obj = {
107
+ width: 315,
108
+ height: 256
109
+ };
110
+ break;
111
+
112
+ case 2:
113
+ obj = {
114
+ width: 478,
115
+ height: 393
116
+ };
117
+ break;
118
+
119
+ case 1:
120
+ obj = {
121
+ width: 960,
122
+ height: 680
123
+ };
124
+ break;
125
+ }
126
+ } else {
127
+ switch (customize === null || customize === void 0 ? void 0 : customize.pcRowNum) {
128
+ case 6:
129
+ obj = {
130
+ width: 159,
131
+ height: 120
132
+ };
133
+ break;
134
+
135
+ case 5:
136
+ obj = {
137
+ width: 195,
138
+ height: 147
139
+ };
140
+ break;
141
+
142
+ case 4:
143
+ obj = {
144
+ width: 251,
145
+ height: 188
146
+ };
147
+ break;
148
+
149
+ case 3:
150
+ obj = {
151
+ width: 341,
152
+ height: 256
153
+ };
154
+ break;
155
+
156
+ case 2:
157
+ obj = {
158
+ width: 524,
159
+ height: 393
160
+ };
161
+ break;
162
+
163
+ case 1:
164
+ obj = {
165
+ width: 1072,
166
+ height: 680
167
+ };
168
+ break;
169
+ }
170
+ }
171
+ } else {
172
+ if ((customize === null || customize === void 0 ? void 0 : customize.layout) == 'layout3') {
173
+ switch (customize === null || customize === void 0 ? void 0 : customize.rowNum) {
174
+ case 5:
175
+ obj = {
176
+ width: 64,
177
+ height: 50
178
+ };
179
+ break;
180
+
181
+ case 4:
182
+ obj = {
183
+ width: 77,
184
+ height: 66
185
+ };
186
+ break;
187
+
188
+ case 3:
189
+ obj = {
190
+ width: 105,
191
+ height: 87
192
+ };
193
+ break;
194
+
195
+ case 2:
196
+ obj = {
197
+ width: 160,
198
+ height: 137
199
+ };
200
+ break;
201
+
202
+ case 1:
203
+ obj = {
204
+ width: 327,
205
+ height: 282
206
+ };
207
+ break;
208
+ }
209
+ } else {
210
+ switch (customize === null || customize === void 0 ? void 0 : customize.rowNum) {
211
+ case 5:
212
+ obj = {
213
+ width: 66,
214
+ height: 50
215
+ };
216
+ break;
217
+
218
+ case 4:
219
+ obj = {
220
+ width: 85,
221
+ height: 66
222
+ };
223
+ break;
224
+
225
+ case 3:
226
+ obj = {
227
+ width: 117,
228
+ height: 87
229
+ };
230
+ break;
231
+
232
+ case 2:
233
+ obj = {
234
+ width: 182,
235
+ height: 137
236
+ };
237
+ break;
238
+
239
+ case 1:
240
+ obj = {
241
+ width: 375,
242
+ height: 282
243
+ };
244
+ break;
245
+ }
246
+ }
247
+ }
248
+
249
+ return obj;
250
+ };
251
+
77
252
  return _this;
78
253
  }
79
254
 
80
255
  CarouselSecondConfig.prototype.render = function () {
81
- var panelProps = this.props.panelProps;
256
+ var _a = this.props,
257
+ panelProps = _a.panelProps,
258
+ parentNode = _a.parentNode;
82
259
  var textSource = [{
83
260
  key: '2',
84
261
  name: (0, _locale.i18n)('TITLE'),
@@ -118,6 +295,8 @@ function (_super) {
118
295
 
119
296
  var _textSource = _mobx.store.CarouselStore[panelProps.compId] === 'layout2' ? textSource : [];
120
297
 
298
+ var size = this.getImageRecommendSize(parentNode.customize);
299
+
121
300
  var getConfig = function getConfig() {
122
301
  return /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
123
302
  headerSize: "middle",
@@ -128,7 +307,8 @@ function (_super) {
128
307
  key: '1',
129
308
  name: (0, _locale.i18n)('IMAGE'),
130
309
  value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
131
- data: panelProps.image
310
+ data: panelProps.image,
311
+ recommendImgSize: size
132
312
  }),
133
313
  metaOption: panelProps.image,
134
314
  toggleType: 'switch'