@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
@@ -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'
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _ImageConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ImageConfig"));
11
11
 
12
+ var _coreUtil = require("../../../../utils/coreUtil");
13
+
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
15
 
14
16
  var __extends = void 0 && (void 0).__extends || function () {
@@ -46,18 +48,128 @@ function (_super) {
46
48
  var _this = _super !== null && _super.apply(this, arguments) || this;
47
49
 
48
50
  _this.state = {};
51
+
52
+ _this.getImageRecommendSize = function (customize) {
53
+ var _a, _b;
54
+
55
+ var obj = null;
56
+
57
+ if ((0, _coreUtil.isPc)()) {
58
+ switch ((_a = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _a === void 0 ? void 0 : _a.pcLayout) {
59
+ case 'layout1':
60
+ obj = {
61
+ width: 1440,
62
+ height: 912
63
+ };
64
+ break;
65
+
66
+ case 'layout2':
67
+ {
68
+ switch (customize === null || customize === void 0 ? void 0 : customize.pcRowNum) {
69
+ case 6:
70
+ obj = {
71
+ width: 220,
72
+ height: 166
73
+ };
74
+ break;
75
+
76
+ case 5:
77
+ obj = {
78
+ width: 268,
79
+ height: 202
80
+ };
81
+ break;
82
+
83
+ case 4:
84
+ obj = {
85
+ width: 342,
86
+ height: 256
87
+ };
88
+ break;
89
+
90
+ case 3:
91
+ obj = {
92
+ width: 464,
93
+ height: 348
94
+ };
95
+ break;
96
+
97
+ case 2:
98
+ obj = {
99
+ width: 708,
100
+ height: 531
101
+ };
102
+ break;
103
+ }
104
+
105
+ break;
106
+ }
107
+ }
108
+ } else {
109
+ switch ((_b = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _b === void 0 ? void 0 : _b.h5Layout) {
110
+ case 'layout1':
111
+ obj = {
112
+ width: 375,
113
+ height: 282
114
+ };
115
+ break;
116
+
117
+ case 'layout2':
118
+ {
119
+ switch (customize === null || customize === void 0 ? void 0 : customize.rowNum) {
120
+ case 5:
121
+ obj = {
122
+ width: 69,
123
+ height: 50
124
+ };
125
+ break;
126
+
127
+ case 4:
128
+ obj = {
129
+ width: 85,
130
+ height: 66
131
+ };
132
+ break;
133
+
134
+ case 3:
135
+ obj = {
136
+ width: 117,
137
+ height: 87
138
+ };
139
+ break;
140
+
141
+ case 2:
142
+ obj = {
143
+ width: 182,
144
+ height: 137
145
+ };
146
+ break;
147
+ }
148
+
149
+ break;
150
+ }
151
+ }
152
+ }
153
+
154
+ return obj;
155
+ };
156
+
49
157
  return _this;
50
158
  }
51
159
 
52
160
  ImageGallerySecondConfig.prototype.render = function () {
53
- var panelProps = this.props.panelProps;
161
+ var _a = this.props,
162
+ panelProps = _a.panelProps,
163
+ parentNode = _a.parentNode;
164
+ var size = this.getImageRecommendSize(parentNode.customize);
54
165
  return /*#__PURE__*/_react["default"].createElement("div", {
55
166
  className: "image_gallery_second_conf_wrap",
56
167
  style: {
57
168
  marginTop: '20px'
58
169
  }
59
170
  }, /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
60
- data: panelProps.image
171
+ data: panelProps.image,
172
+ recommendImgSize: size
61
173
  }));
62
174
  };
63
175
 
@@ -81,13 +81,123 @@ function (_super) {
81
81
 
82
82
  _this.state = {};
83
83
 
84
+ _this.getImageRecommendSize = function (customize) {
85
+ var _a, _b, _c;
86
+
87
+ var obj = null;
88
+
89
+ if ((0, _coreUtil.isPc)()) {
90
+ if (((_a = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _a === void 0 ? void 0 : _a.pcLayout) == 'normal' || ((_b = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _b === void 0 ? void 0 : _b.pcLayout) == 'center') {
91
+ switch (customize === null || customize === void 0 ? void 0 : customize.pcRowNum) {
92
+ case 5:
93
+ obj = {
94
+ width: 119,
95
+ height: 90
96
+ };
97
+ break;
98
+
99
+ case 4:
100
+ obj = {
101
+ width: 150,
102
+ height: 112
103
+ };
104
+ break;
105
+
106
+ case 3:
107
+ obj = {
108
+ width: 205,
109
+ height: 154
110
+ };
111
+ break;
112
+
113
+ case 2:
114
+ obj = {
115
+ width: 314,
116
+ height: 236
117
+ };
118
+ break;
119
+
120
+ case 1:
121
+ obj = {
122
+ width: 640,
123
+ height: 480
124
+ };
125
+ break;
126
+ }
127
+ } else {
128
+ obj = {
129
+ width: 65,
130
+ height: 65
131
+ };
132
+ }
133
+ } else {
134
+ switch ((_c = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _c === void 0 ? void 0 : _c.h5Layout) {
135
+ case 'normal2':
136
+ obj = {
137
+ width: 190,
138
+ height: 142
139
+ };
140
+ break;
141
+
142
+ case 'normal3':
143
+ {
144
+ switch (customize === null || customize === void 0 ? void 0 : customize.rowNum) {
145
+ case 4:
146
+ obj = {
147
+ width: 61,
148
+ height: 61
149
+ };
150
+ break;
151
+
152
+ case 3:
153
+ obj = {
154
+ width: 91,
155
+ height: 91
156
+ };
157
+ break;
158
+
159
+ case 2:
160
+ obj = {
161
+ width: 150,
162
+ height: 150
163
+ };
164
+ break;
165
+
166
+ case 1:
167
+ obj = {
168
+ width: 327,
169
+ height: 327
170
+ };
171
+ break;
172
+ }
173
+
174
+ break;
175
+ }
176
+
177
+ default:
178
+ obj = {
179
+ width: 38,
180
+ height: 38
181
+ };
182
+ break;
183
+ }
184
+ }
185
+
186
+ return obj;
187
+ };
188
+
84
189
  _this.getContentPanel = function (data, needHover) {
190
+ var parentNode = _this.props.parentNode;
191
+
192
+ var size = _this.getImageRecommendSize(parentNode.customize);
193
+
85
194
  var source = [{
86
195
  key: 'imageTextSecondContent1',
87
196
  name: (0, _locale.i18n)('IMAGE'),
88
197
  value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
89
198
  data: data.image,
90
- needHover: needHover
199
+ needHover: needHover,
200
+ recommendImgSize: size
91
201
  }),
92
202
  metaOption: data.image
93
203
  }, {
@@ -182,7 +292,8 @@ function (_super) {
182
292
  };
183
293
 
184
294
  ImageTextSecondConfig.defaultProps = {
185
- panelProps: {}
295
+ panelProps: {},
296
+ parentNode: {}
186
297
  };
187
298
  return ImageTextSecondConfig;
188
299
  }(_react["default"].Component);