@fonixtree/magic-design 0.0.67 → 0.0.68

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.
@@ -306,13 +306,15 @@ function (_super) {
306
306
  };
307
307
 
308
308
  _this.onCollapseChange = function (value) {
309
- var type = _this.props.type;
309
+ var _a = _this.props,
310
+ type = _a.type,
311
+ noChange = _a.noChange;
310
312
 
311
313
  _this.setState({
312
314
  activeKey: value ? [value] : []
313
315
  });
314
316
 
315
- if (type === 'switch') {
317
+ if (!noChange && type === 'switch') {
316
318
  _mobx.store.setState({
317
319
  clickedMeta: value
318
320
  });
@@ -9,11 +9,16 @@ var _uuid = require("uuid");
9
9
 
10
10
  var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
11
11
  var groupId = (0, _uuid.v4)();
12
+ var imageId = (0, _uuid.v4)();
13
+ var titleId = (0, _uuid.v4)();
14
+ var textId = (0, _uuid.v4)();
15
+ var buttonId = (0, _uuid.v4)();
16
+ var secButtonId = (0, _uuid.v4)();
12
17
  return {
13
18
  id: groupId,
14
19
  image: {
15
20
  parentId: groupId,
16
- id: (0, _uuid.v4)(),
21
+ id: imageId,
17
22
  open: false,
18
23
  type: 'IMAGE',
19
24
  content: {
@@ -33,7 +38,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
33
38
  },
34
39
  title: {
35
40
  parentId: groupId,
36
- id: (0, _uuid.v4)(),
41
+ id: titleId,
37
42
  open: true,
38
43
  type: 'TEXT',
39
44
  specialContent: [],
@@ -55,7 +60,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
55
60
  },
56
61
  text: {
57
62
  parentId: groupId,
58
- id: (0, _uuid.v4)(),
63
+ id: textId,
59
64
  open: true,
60
65
  type: 'TEXT',
61
66
  specialContent: [],
@@ -73,7 +78,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
73
78
  },
74
79
  button: {
75
80
  parentId: groupId,
76
- id: (0, _uuid.v4)(),
81
+ id: buttonId,
77
82
  open: true,
78
83
  type: 'BUTTON',
79
84
  text: 'Button',
@@ -128,7 +133,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
128
133
  },
129
134
  secondButton: {
130
135
  parentId: groupId,
131
- id: (0, _uuid.v4)(),
136
+ id: secButtonId,
132
137
  open: true,
133
138
  type: 'BUTTON',
134
139
  text: 'More',
@@ -191,7 +196,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
191
196
  open: false,
192
197
  image: {
193
198
  parentId: groupId,
194
- id: (0, _uuid.v4)(),
199
+ id: imageId,
195
200
  open: false,
196
201
  type: 'IMAGE',
197
202
  content: {
@@ -211,7 +216,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
211
216
  },
212
217
  title: {
213
218
  parentId: groupId,
214
- id: (0, _uuid.v4)(),
219
+ id: titleId,
215
220
  open: true,
216
221
  type: 'TEXT',
217
222
  specialContent: [],
@@ -231,7 +236,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
231
236
  vertical: {}
232
237
  },
233
238
  text: {
234
- id: (0, _uuid.v4)(),
239
+ id: textId,
235
240
  open: true,
236
241
  type: 'TEXT',
237
242
  specialContent: [],
@@ -248,7 +253,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
248
253
  vertical: {}
249
254
  },
250
255
  button: {
251
- id: (0, _uuid.v4)(),
256
+ id: buttonId,
252
257
  open: true,
253
258
  type: 'BUTTON',
254
259
  text: 'Button',
@@ -298,7 +303,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
298
303
  }
299
304
  },
300
305
  secondButton: {
301
- id: (0, _uuid.v4)(),
306
+ id: secButtonId,
302
307
  open: true,
303
308
  type: 'BUTTON',
304
309
  text: 'More',
@@ -25,6 +25,8 @@ var _coreUtil = require("../../../../utils/coreUtil");
25
25
 
26
26
  var _locale = require("../../../../locale");
27
27
 
28
+ require("./index.less");
29
+
28
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29
31
 
30
32
  var __extends = void 0 && (void 0).__extends || function () {
@@ -121,12 +123,15 @@ function (_super) {
121
123
  }];
122
124
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
123
125
  headerSize: "middle",
126
+ noChange: !needHover,
124
127
  onRefresh: function onRefresh() {
125
128
  return (0, _coreUtil.renderPreview)();
126
129
  },
127
130
  showActiveColor: true,
128
131
  source: source,
129
132
  type: "switch"
133
+ }), /*#__PURE__*/_react["default"].createElement("div", {
134
+ className: "line"
130
135
  }), /*#__PURE__*/_react["default"].createElement(_common.Field, null, /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
131
136
  data: data.background
132
137
  })));
@@ -137,9 +142,9 @@ function (_super) {
137
142
 
138
143
  if (panelProps.hover.open) {
139
144
  var tempObj = {};
140
- tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.button, ['buttonBorder', 'buttonIcon', 'buttonText', 'content', 'open', 'text']));
145
+ tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.button, ['buttonBorder', 'buttonIcon', 'buttonText', 'spacing', 'content', 'open', 'text']));
141
146
  panelProps.hover.button = __assign(__assign({}, panelProps.hover.button), tempObj);
142
- tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.secondButton, ['buttonBorder', 'buttonIcon', 'buttonText', 'content', 'open', 'text']));
147
+ tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.secondButton, ['buttonBorder', 'buttonIcon', 'buttonText', 'spacing', 'content', 'open', 'text']));
143
148
  panelProps.hover.secondButton = __assign(__assign({}, panelProps.hover.secondButton), tempObj);
144
149
  tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.image, ['content', 'open']));
145
150
  panelProps.hover.image = __assign(__assign({}, panelProps.hover.image), tempObj);
@@ -157,7 +162,7 @@ function (_super) {
157
162
  ImageTextSecondConfig.prototype.render = function () {
158
163
  var panelProps = this.props.panelProps;
159
164
  return /*#__PURE__*/_react["default"].createElement("div", {
160
- className: "banner_second_conf_wrap"
165
+ className: "imagetext_second_conf_wrap"
161
166
  }, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
162
167
  divider: "bold",
163
168
  headerSize: "large",
@@ -0,0 +1,8 @@
1
+ .imagetext_second_conf_wrap {
2
+ .line {
3
+ height: 1px;
4
+ width: 100%;
5
+ background-color: #EDF0F4;
6
+ margin-bottom: 20px;
7
+ }
8
+ }
@@ -9,12 +9,14 @@ var _uuid = require("uuid");
9
9
 
10
10
  var recommendGroupSourceJSON = function recommendGroupSourceJSON(parentId, logo, text) {
11
11
  var groupId = (0, _uuid.v4)();
12
+ var imageId = (0, _uuid.v4)();
13
+ var groupNameId = (0, _uuid.v4)();
12
14
  return {
13
15
  id: groupId,
14
16
  parentId: parentId,
15
17
  image: {
16
18
  parentId: groupId,
17
- id: (0, _uuid.v4)(),
19
+ id: imageId,
18
20
  open: true,
19
21
  type: 'IMAGE',
20
22
  content: {
@@ -34,7 +36,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(parentId, logo,
34
36
  },
35
37
  groupName: {
36
38
  parentId: groupId,
37
- id: (0, _uuid.v4)(),
39
+ id: groupNameId,
38
40
  open: true,
39
41
  type: 'TEXT',
40
42
  specialContent: [],
@@ -105,7 +107,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(parentId, logo,
105
107
  open: false,
106
108
  image: {
107
109
  parentId: groupId,
108
- id: (0, _uuid.v4)(),
110
+ id: imageId,
109
111
  open: false,
110
112
  type: 'IMAGE',
111
113
  content: {
@@ -125,7 +127,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(parentId, logo,
125
127
  },
126
128
  groupName: {
127
129
  parentId: groupId,
128
- id: (0, _uuid.v4)(),
130
+ id: groupNameId,
129
131
  open: false,
130
132
  type: 'TEXT',
131
133
  specialContent: [],
@@ -288,9 +288,10 @@ function (_super) {
288
288
 
289
289
  _this.getTabBarActiveColor = function (_panelProps) {
290
290
  var tabIndex = _this.state.tabIndex;
291
- return (0, _commonUtil.ensure)(function () {
292
- return _panelProps.groupSource[tabIndex].hover.groupName.content.color;
293
- }, '#1890ff');
291
+ var activeHoverGroupName = _panelProps.groupSource[tabIndex].hover;
292
+ return activeHoverGroupName.open ? (0, _commonUtil.ensure)(function () {
293
+ return activeHoverGroupName.groupName.content.color;
294
+ }, '#CE1126') : '#CE1126';
294
295
  };
295
296
 
296
297
  _this.getProductList = function (index) {
@@ -55,6 +55,22 @@ var __extends = void 0 && (void 0).__extends || function () {
55
55
  };
56
56
  }();
57
57
 
58
+ var __assign = void 0 && (void 0).__assign || function () {
59
+ __assign = Object.assign || function (t) {
60
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
61
+ s = arguments[i];
62
+
63
+ for (var p in s) {
64
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
65
+ }
66
+ }
67
+
68
+ return t;
69
+ };
70
+
71
+ return __assign.apply(this, arguments);
72
+ };
73
+
58
74
  var RecommendSecondConfig =
59
75
  /** @class */
60
76
  function (_super) {
@@ -68,14 +84,6 @@ function (_super) {
68
84
  _this.getContentPanel = function () {
69
85
  var panelProps = _this.props.panelProps;
70
86
 
71
- if (!panelProps.hover) {
72
- panelProps.hover = {
73
- open: false,
74
- image: JSON.parse(JSON.stringify(panelProps.image)),
75
- groupName: JSON.parse(JSON.stringify(panelProps.groupName))
76
- };
77
- }
78
-
79
87
  var productSource = /*#__PURE__*/_react["default"].createElement("div", {
80
88
  className: "sourceOfProduct"
81
89
  }, /*#__PURE__*/_react["default"].createElement(_common.Field, {
@@ -130,26 +138,6 @@ function (_super) {
130
138
  value: 100
131
139
  }, "\u2264100")))));
132
140
 
133
- var hoverSetting = /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
134
- divider: "dashed",
135
- source: [{
136
- key: 'hoverSetting_1',
137
- name: (0, _locale.i18n)('IMAGE'),
138
- value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
139
- data: panelProps.hover.image
140
- }),
141
- metaOption: panelProps.hover.image
142
- }, {
143
- key: 'hoverSetting_2',
144
- name: (0, _locale.i18n)('GROUP_NAME'),
145
- value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
146
- data: panelProps.hover.groupName
147
- }),
148
- metaOption: panelProps.hover.groupName
149
- }],
150
- type: "switch"
151
- });
152
-
153
141
  var defaultSource = [{
154
142
  key: 'defaultSource_1',
155
143
  name: (0, _locale.i18n)('IMAGE'),
@@ -172,13 +160,6 @@ function (_super) {
172
160
  }),
173
161
  metaOption: panelProps.seeAll
174
162
  }];
175
- var hoverSource = [{
176
- key: 'defaultSource_5',
177
- name: (0, _locale.i18n)('HOVER'),
178
- value: hoverSetting,
179
- metaOption: panelProps.hover,
180
- toggleType: 'checkbox'
181
- }];
182
163
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
183
164
  headerSize: "middle",
184
165
  onRefresh: function onRefresh() {
@@ -187,30 +168,68 @@ function (_super) {
187
168
  showActiveColor: true,
188
169
  source: defaultSource,
189
170
  type: "switch"
190
- }), productSource, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
191
- headerSize: "middle",
192
- onRefresh: function onRefresh() {
193
- return (0, _coreUtil.renderPreview)();
194
- },
195
- showActiveColor: true,
196
- source: hoverSource,
197
- type: "switch"
198
- }));
171
+ }), productSource);
172
+ };
173
+
174
+ _this.resetHover = function () {
175
+ var panelProps = _this.props.panelProps;
176
+
177
+ if (panelProps.hover.open) {
178
+ panelProps.hover.image = __assign(__assign({}, panelProps.hover.image), JSON.parse(JSON.stringify(panelProps.image)));
179
+ panelProps.hover.groupName = __assign(__assign({}, panelProps.hover.groupName), JSON.parse(JSON.stringify(panelProps.groupName)));
180
+ }
199
181
  };
200
182
 
201
183
  return _this;
202
184
  }
203
185
 
204
186
  RecommendSecondConfig.prototype.render = function () {
187
+ var _this = this;
188
+
189
+ var panelProps = this.props.panelProps;
190
+
191
+ var hoverPanel = /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
192
+ divider: "dashed",
193
+ noChange: true,
194
+ onRefresh: function onRefresh() {
195
+ return (0, _coreUtil.renderPreview)();
196
+ },
197
+ source: [{
198
+ key: 'hoverSetting_1',
199
+ name: (0, _locale.i18n)('IMAGE'),
200
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
201
+ data: panelProps.hover.image
202
+ }),
203
+ metaOption: panelProps.hover.image
204
+ }, {
205
+ key: 'hoverSetting_2',
206
+ name: (0, _locale.i18n)('GROUP_NAME'),
207
+ value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
208
+ data: panelProps.hover.groupName
209
+ }),
210
+ metaOption: panelProps.hover.groupName
211
+ }],
212
+ type: "switch"
213
+ });
214
+
205
215
  return /*#__PURE__*/_react["default"].createElement("div", {
206
216
  className: "recommend_second_conf_wrap"
207
217
  }, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
208
218
  divider: "bold",
209
219
  headerSize: "large",
220
+ onRefresh: function onRefresh() {
221
+ return _this.resetHover();
222
+ },
210
223
  source: [{
211
224
  key: '1',
212
225
  name: (0, _locale.i18n)('CONTENT'),
213
226
  value: this.getContentPanel()
227
+ }, {
228
+ key: '2',
229
+ name: (0, _locale.i18n)('HOVER'),
230
+ value: hoverPanel,
231
+ metaOption: panelProps.hover,
232
+ toggleType: 'checkbox'
214
233
  }]
215
234
  }));
216
235
  };
@@ -2,9 +2,8 @@
2
2
 
3
3
  .sourceOfProduct {
4
4
  border-top: 1px solid #D2D9E5;
5
- border-bottom: 1px solid #D2D9E5;
6
5
  padding-top: 20px;
7
- padding-bottom: 20px;
6
+ padding-bottom: 10px;
8
7
 
9
8
  .greyBg {
10
9
  background: #F5F6F7;
@@ -306,13 +306,15 @@ function (_super) {
306
306
  };
307
307
 
308
308
  _this.onCollapseChange = function (value) {
309
- var type = _this.props.type;
309
+ var _a = _this.props,
310
+ type = _a.type,
311
+ noChange = _a.noChange;
310
312
 
311
313
  _this.setState({
312
314
  activeKey: value ? [value] : []
313
315
  });
314
316
 
315
- if (type === 'switch') {
317
+ if (!noChange && type === 'switch') {
316
318
  _mobx.store.setState({
317
319
  clickedMeta: value
318
320
  });
@@ -9,11 +9,16 @@ var _uuid = require("uuid");
9
9
 
10
10
  var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
11
11
  var groupId = (0, _uuid.v4)();
12
+ var imageId = (0, _uuid.v4)();
13
+ var titleId = (0, _uuid.v4)();
14
+ var textId = (0, _uuid.v4)();
15
+ var buttonId = (0, _uuid.v4)();
16
+ var secButtonId = (0, _uuid.v4)();
12
17
  return {
13
18
  id: groupId,
14
19
  image: {
15
20
  parentId: groupId,
16
- id: (0, _uuid.v4)(),
21
+ id: imageId,
17
22
  open: false,
18
23
  type: 'IMAGE',
19
24
  content: {
@@ -33,7 +38,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
33
38
  },
34
39
  title: {
35
40
  parentId: groupId,
36
- id: (0, _uuid.v4)(),
41
+ id: titleId,
37
42
  open: true,
38
43
  type: 'TEXT',
39
44
  specialContent: [],
@@ -55,7 +60,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
55
60
  },
56
61
  text: {
57
62
  parentId: groupId,
58
- id: (0, _uuid.v4)(),
63
+ id: textId,
59
64
  open: true,
60
65
  type: 'TEXT',
61
66
  specialContent: [],
@@ -73,7 +78,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
73
78
  },
74
79
  button: {
75
80
  parentId: groupId,
76
- id: (0, _uuid.v4)(),
81
+ id: buttonId,
77
82
  open: true,
78
83
  type: 'BUTTON',
79
84
  text: 'Button',
@@ -128,7 +133,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
128
133
  },
129
134
  secondButton: {
130
135
  parentId: groupId,
131
- id: (0, _uuid.v4)(),
136
+ id: secButtonId,
132
137
  open: true,
133
138
  type: 'BUTTON',
134
139
  text: 'More',
@@ -191,7 +196,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
191
196
  open: false,
192
197
  image: {
193
198
  parentId: groupId,
194
- id: (0, _uuid.v4)(),
199
+ id: imageId,
195
200
  open: false,
196
201
  type: 'IMAGE',
197
202
  content: {
@@ -211,7 +216,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
211
216
  },
212
217
  title: {
213
218
  parentId: groupId,
214
- id: (0, _uuid.v4)(),
219
+ id: titleId,
215
220
  open: true,
216
221
  type: 'TEXT',
217
222
  specialContent: [],
@@ -231,7 +236,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
231
236
  vertical: {}
232
237
  },
233
238
  text: {
234
- id: (0, _uuid.v4)(),
239
+ id: textId,
235
240
  open: true,
236
241
  type: 'TEXT',
237
242
  specialContent: [],
@@ -248,7 +253,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
248
253
  vertical: {}
249
254
  },
250
255
  button: {
251
- id: (0, _uuid.v4)(),
256
+ id: buttonId,
252
257
  open: true,
253
258
  type: 'BUTTON',
254
259
  text: 'Button',
@@ -298,7 +303,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
298
303
  }
299
304
  },
300
305
  secondButton: {
301
- id: (0, _uuid.v4)(),
306
+ id: secButtonId,
302
307
  open: true,
303
308
  type: 'BUTTON',
304
309
  text: 'More',
@@ -25,6 +25,8 @@ var _coreUtil = require("../../../../utils/coreUtil");
25
25
 
26
26
  var _locale = require("../../../../locale");
27
27
 
28
+ require("./index.less");
29
+
28
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29
31
 
30
32
  var __extends = void 0 && (void 0).__extends || function () {
@@ -121,12 +123,15 @@ function (_super) {
121
123
  }];
122
124
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
123
125
  headerSize: "middle",
126
+ noChange: !needHover,
124
127
  onRefresh: function onRefresh() {
125
128
  return (0, _coreUtil.renderPreview)();
126
129
  },
127
130
  showActiveColor: true,
128
131
  source: source,
129
132
  type: "switch"
133
+ }), /*#__PURE__*/_react["default"].createElement("div", {
134
+ className: "line"
130
135
  }), /*#__PURE__*/_react["default"].createElement(_common.Field, null, /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
131
136
  data: data.background
132
137
  })));
@@ -137,9 +142,9 @@ function (_super) {
137
142
 
138
143
  if (panelProps.hover.open) {
139
144
  var tempObj = {};
140
- tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.button, ['buttonBorder', 'buttonIcon', 'buttonText', 'content', 'open', 'text']));
145
+ tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.button, ['buttonBorder', 'buttonIcon', 'buttonText', 'spacing', 'content', 'open', 'text']));
141
146
  panelProps.hover.button = __assign(__assign({}, panelProps.hover.button), tempObj);
142
- tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.secondButton, ['buttonBorder', 'buttonIcon', 'buttonText', 'content', 'open', 'text']));
147
+ tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.secondButton, ['buttonBorder', 'buttonIcon', 'buttonText', 'spacing', 'content', 'open', 'text']));
143
148
  panelProps.hover.secondButton = __assign(__assign({}, panelProps.hover.secondButton), tempObj);
144
149
  tempObj = (0, _lodash.cloneDeep)((0, _lodash.pick)(panelProps.image, ['content', 'open']));
145
150
  panelProps.hover.image = __assign(__assign({}, panelProps.hover.image), tempObj);
@@ -157,7 +162,7 @@ function (_super) {
157
162
  ImageTextSecondConfig.prototype.render = function () {
158
163
  var panelProps = this.props.panelProps;
159
164
  return /*#__PURE__*/_react["default"].createElement("div", {
160
- className: "banner_second_conf_wrap"
165
+ className: "imagetext_second_conf_wrap"
161
166
  }, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
162
167
  divider: "bold",
163
168
  headerSize: "large",
@@ -0,0 +1,8 @@
1
+ .imagetext_second_conf_wrap {
2
+ .line {
3
+ height: 1px;
4
+ width: 100%;
5
+ background-color: #EDF0F4;
6
+ margin-bottom: 20px;
7
+ }
8
+ }
@@ -9,12 +9,14 @@ var _uuid = require("uuid");
9
9
 
10
10
  var recommendGroupSourceJSON = function recommendGroupSourceJSON(parentId, logo, text) {
11
11
  var groupId = (0, _uuid.v4)();
12
+ var imageId = (0, _uuid.v4)();
13
+ var groupNameId = (0, _uuid.v4)();
12
14
  return {
13
15
  id: groupId,
14
16
  parentId: parentId,
15
17
  image: {
16
18
  parentId: groupId,
17
- id: (0, _uuid.v4)(),
19
+ id: imageId,
18
20
  open: true,
19
21
  type: 'IMAGE',
20
22
  content: {
@@ -34,7 +36,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(parentId, logo,
34
36
  },
35
37
  groupName: {
36
38
  parentId: groupId,
37
- id: (0, _uuid.v4)(),
39
+ id: groupNameId,
38
40
  open: true,
39
41
  type: 'TEXT',
40
42
  specialContent: [],
@@ -105,7 +107,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(parentId, logo,
105
107
  open: false,
106
108
  image: {
107
109
  parentId: groupId,
108
- id: (0, _uuid.v4)(),
110
+ id: imageId,
109
111
  open: false,
110
112
  type: 'IMAGE',
111
113
  content: {
@@ -125,7 +127,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(parentId, logo,
125
127
  },
126
128
  groupName: {
127
129
  parentId: groupId,
128
- id: (0, _uuid.v4)(),
130
+ id: groupNameId,
129
131
  open: false,
130
132
  type: 'TEXT',
131
133
  specialContent: [],
@@ -288,9 +288,10 @@ function (_super) {
288
288
 
289
289
  _this.getTabBarActiveColor = function (_panelProps) {
290
290
  var tabIndex = _this.state.tabIndex;
291
- return (0, _commonUtil.ensure)(function () {
292
- return _panelProps.groupSource[tabIndex].hover.groupName.content.color;
293
- }, '#1890ff');
291
+ var activeHoverGroupName = _panelProps.groupSource[tabIndex].hover;
292
+ return activeHoverGroupName.open ? (0, _commonUtil.ensure)(function () {
293
+ return activeHoverGroupName.groupName.content.color;
294
+ }, '#CE1126') : '#CE1126';
294
295
  };
295
296
 
296
297
  _this.getProductList = function (index) {
@@ -55,6 +55,22 @@ var __extends = void 0 && (void 0).__extends || function () {
55
55
  };
56
56
  }();
57
57
 
58
+ var __assign = void 0 && (void 0).__assign || function () {
59
+ __assign = Object.assign || function (t) {
60
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
61
+ s = arguments[i];
62
+
63
+ for (var p in s) {
64
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
65
+ }
66
+ }
67
+
68
+ return t;
69
+ };
70
+
71
+ return __assign.apply(this, arguments);
72
+ };
73
+
58
74
  var RecommendSecondConfig =
59
75
  /** @class */
60
76
  function (_super) {
@@ -68,14 +84,6 @@ function (_super) {
68
84
  _this.getContentPanel = function () {
69
85
  var panelProps = _this.props.panelProps;
70
86
 
71
- if (!panelProps.hover) {
72
- panelProps.hover = {
73
- open: false,
74
- image: JSON.parse(JSON.stringify(panelProps.image)),
75
- groupName: JSON.parse(JSON.stringify(panelProps.groupName))
76
- };
77
- }
78
-
79
87
  var productSource = /*#__PURE__*/_react["default"].createElement("div", {
80
88
  className: "sourceOfProduct"
81
89
  }, /*#__PURE__*/_react["default"].createElement(_common.Field, {
@@ -130,26 +138,6 @@ function (_super) {
130
138
  value: 100
131
139
  }, "\u2264100")))));
132
140
 
133
- var hoverSetting = /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
134
- divider: "dashed",
135
- source: [{
136
- key: 'hoverSetting_1',
137
- name: (0, _locale.i18n)('IMAGE'),
138
- value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
139
- data: panelProps.hover.image
140
- }),
141
- metaOption: panelProps.hover.image
142
- }, {
143
- key: 'hoverSetting_2',
144
- name: (0, _locale.i18n)('GROUP_NAME'),
145
- value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
146
- data: panelProps.hover.groupName
147
- }),
148
- metaOption: panelProps.hover.groupName
149
- }],
150
- type: "switch"
151
- });
152
-
153
141
  var defaultSource = [{
154
142
  key: 'defaultSource_1',
155
143
  name: (0, _locale.i18n)('IMAGE'),
@@ -172,13 +160,6 @@ function (_super) {
172
160
  }),
173
161
  metaOption: panelProps.seeAll
174
162
  }];
175
- var hoverSource = [{
176
- key: 'defaultSource_5',
177
- name: (0, _locale.i18n)('HOVER'),
178
- value: hoverSetting,
179
- metaOption: panelProps.hover,
180
- toggleType: 'checkbox'
181
- }];
182
163
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
183
164
  headerSize: "middle",
184
165
  onRefresh: function onRefresh() {
@@ -187,30 +168,68 @@ function (_super) {
187
168
  showActiveColor: true,
188
169
  source: defaultSource,
189
170
  type: "switch"
190
- }), productSource, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
191
- headerSize: "middle",
192
- onRefresh: function onRefresh() {
193
- return (0, _coreUtil.renderPreview)();
194
- },
195
- showActiveColor: true,
196
- source: hoverSource,
197
- type: "switch"
198
- }));
171
+ }), productSource);
172
+ };
173
+
174
+ _this.resetHover = function () {
175
+ var panelProps = _this.props.panelProps;
176
+
177
+ if (panelProps.hover.open) {
178
+ panelProps.hover.image = __assign(__assign({}, panelProps.hover.image), JSON.parse(JSON.stringify(panelProps.image)));
179
+ panelProps.hover.groupName = __assign(__assign({}, panelProps.hover.groupName), JSON.parse(JSON.stringify(panelProps.groupName)));
180
+ }
199
181
  };
200
182
 
201
183
  return _this;
202
184
  }
203
185
 
204
186
  RecommendSecondConfig.prototype.render = function () {
187
+ var _this = this;
188
+
189
+ var panelProps = this.props.panelProps;
190
+
191
+ var hoverPanel = /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
192
+ divider: "dashed",
193
+ noChange: true,
194
+ onRefresh: function onRefresh() {
195
+ return (0, _coreUtil.renderPreview)();
196
+ },
197
+ source: [{
198
+ key: 'hoverSetting_1',
199
+ name: (0, _locale.i18n)('IMAGE'),
200
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
201
+ data: panelProps.hover.image
202
+ }),
203
+ metaOption: panelProps.hover.image
204
+ }, {
205
+ key: 'hoverSetting_2',
206
+ name: (0, _locale.i18n)('GROUP_NAME'),
207
+ value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
208
+ data: panelProps.hover.groupName
209
+ }),
210
+ metaOption: panelProps.hover.groupName
211
+ }],
212
+ type: "switch"
213
+ });
214
+
205
215
  return /*#__PURE__*/_react["default"].createElement("div", {
206
216
  className: "recommend_second_conf_wrap"
207
217
  }, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
208
218
  divider: "bold",
209
219
  headerSize: "large",
220
+ onRefresh: function onRefresh() {
221
+ return _this.resetHover();
222
+ },
210
223
  source: [{
211
224
  key: '1',
212
225
  name: (0, _locale.i18n)('CONTENT'),
213
226
  value: this.getContentPanel()
227
+ }, {
228
+ key: '2',
229
+ name: (0, _locale.i18n)('HOVER'),
230
+ value: hoverPanel,
231
+ metaOption: panelProps.hover,
232
+ toggleType: 'checkbox'
214
233
  }]
215
234
  }));
216
235
  };
@@ -2,9 +2,8 @@
2
2
 
3
3
  .sourceOfProduct {
4
4
  border-top: 1px solid #D2D9E5;
5
- border-bottom: 1px solid #D2D9E5;
6
5
  padding-top: 20px;
7
- padding-bottom: 20px;
6
+ padding-bottom: 10px;
8
7
 
9
8
  .greyBg {
10
9
  background: #F5F6F7;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.0.67",
4
+ "version": "0.0.68",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",