@fonixtree/magic-design 0.1.23 → 0.1.25

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 (31) hide show
  1. package/es/common/Collapse/index.js +4 -0
  2. package/es/common/LinkModal/MiniAppTable/index.js +250 -0
  3. package/es/common/LinkModal/index.js +6 -0
  4. package/es/composite-comp/bol/components/Banner/pc/index.js +11 -3
  5. package/es/composite-comp/bol/components/Banner/pc/index.less +2 -2
  6. package/es/composite-comp/bol/components/Carousel/mobile/index.js +4 -4
  7. package/es/composite-comp/bol/components/Carousel/pc/index.js +5 -4
  8. package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +12 -40
  9. package/es/composite-comp/dito/components/PcNavigation/pc/index.less +42 -27
  10. package/es/constants/index.js +2 -1
  11. package/es/meta-comp/components/Image/index.js +1 -1
  12. package/es/meta-comp/config-panels/ButtonConfig/index.js +18 -1
  13. package/es/utils/businessUtil.js +12 -0
  14. package/es/utils/commonUtil.js +4 -0
  15. package/es/utils/coreUtil.js +0 -1
  16. package/lib/common/Collapse/index.js +4 -0
  17. package/lib/common/LinkModal/MiniAppTable/index.js +250 -0
  18. package/lib/common/LinkModal/index.js +6 -0
  19. package/lib/composite-comp/bol/components/Banner/pc/index.js +11 -3
  20. package/lib/composite-comp/bol/components/Banner/pc/index.less +2 -2
  21. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +4 -4
  22. package/lib/composite-comp/bol/components/Carousel/pc/index.js +5 -4
  23. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +12 -40
  24. package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +42 -27
  25. package/lib/constants/index.js +2 -1
  26. package/lib/meta-comp/components/Image/index.js +1 -1
  27. package/lib/meta-comp/config-panels/ButtonConfig/index.js +18 -1
  28. package/lib/utils/businessUtil.js +12 -0
  29. package/lib/utils/commonUtil.js +4 -0
  30. package/lib/utils/coreUtil.js +0 -1
  31. package/package.json +1 -1
@@ -137,6 +137,10 @@ function (_super) {
137
137
  var activeKey = _this.state.activeKey;
138
138
 
139
139
  if (checked) {
140
+ if (panelInfo.checkClick) {
141
+ panelInfo.checkClick();
142
+ }
143
+
140
144
  _this.setState({
141
145
  activeKey: [((_a = panelInfo.metaOption) === null || _a === void 0 ? void 0 : _a.id) || panelInfo.key]
142
146
  });
@@ -0,0 +1,250 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = CustomTable;
9
+
10
+ var _antd = require("antd");
11
+
12
+ var _react = _interopRequireWildcard(require("react"));
13
+
14
+ var _commonUtil = require("../../../utils/commonUtil");
15
+
16
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
+
18
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
+
20
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
21
+ function adopt(value) {
22
+ return value instanceof P ? value : new P(function (resolve) {
23
+ resolve(value);
24
+ });
25
+ }
26
+
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) {
29
+ try {
30
+ step(generator.next(value));
31
+ } catch (e) {
32
+ reject(e);
33
+ }
34
+ }
35
+
36
+ function rejected(value) {
37
+ try {
38
+ step(generator["throw"](value));
39
+ } catch (e) {
40
+ reject(e);
41
+ }
42
+ }
43
+
44
+ function step(result) {
45
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
46
+ }
47
+
48
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
49
+ });
50
+ };
51
+
52
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
53
+ var _ = {
54
+ label: 0,
55
+ sent: function sent() {
56
+ if (t[0] & 1) throw t[1];
57
+ return t[1];
58
+ },
59
+ trys: [],
60
+ ops: []
61
+ },
62
+ f,
63
+ y,
64
+ t,
65
+ g;
66
+ return g = {
67
+ next: verb(0),
68
+ "throw": verb(1),
69
+ "return": verb(2)
70
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
71
+ return this;
72
+ }), g;
73
+
74
+ function verb(n) {
75
+ return function (v) {
76
+ return step([n, v]);
77
+ };
78
+ }
79
+
80
+ function step(op) {
81
+ if (f) throw new TypeError("Generator is already executing.");
82
+
83
+ while (_) {
84
+ try {
85
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
86
+ if (y = 0, t) op = [op[0] & 2, t.value];
87
+
88
+ switch (op[0]) {
89
+ case 0:
90
+ case 1:
91
+ t = op;
92
+ break;
93
+
94
+ case 4:
95
+ _.label++;
96
+ return {
97
+ value: op[1],
98
+ done: false
99
+ };
100
+
101
+ case 5:
102
+ _.label++;
103
+ y = op[1];
104
+ op = [0];
105
+ continue;
106
+
107
+ case 7:
108
+ op = _.ops.pop();
109
+
110
+ _.trys.pop();
111
+
112
+ continue;
113
+
114
+ default:
115
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
116
+ _ = 0;
117
+ continue;
118
+ }
119
+
120
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
121
+ _.label = op[1];
122
+ break;
123
+ }
124
+
125
+ if (op[0] === 6 && _.label < t[1]) {
126
+ _.label = t[1];
127
+ t = op;
128
+ break;
129
+ }
130
+
131
+ if (t && _.label < t[2]) {
132
+ _.label = t[2];
133
+
134
+ _.ops.push(op);
135
+
136
+ break;
137
+ }
138
+
139
+ if (t[2]) _.ops.pop();
140
+
141
+ _.trys.pop();
142
+
143
+ continue;
144
+ }
145
+
146
+ op = body.call(thisArg, _);
147
+ } catch (e) {
148
+ op = [6, e];
149
+ y = 0;
150
+ } finally {
151
+ f = t = 0;
152
+ }
153
+ }
154
+
155
+ if (op[0] & 5) throw op[1];
156
+ return {
157
+ value: op[0] ? op[1] : void 0,
158
+ done: true
159
+ };
160
+ }
161
+ };
162
+
163
+ function CustomTable(props) {
164
+ var _this = this;
165
+
166
+ var _onChange = props.onChange;
167
+
168
+ var _a = (0, _react.useState)([]),
169
+ miniAppList = _a[0],
170
+ setMiniAppList = _a[1];
171
+
172
+ var _b = (0, _react.useState)(false),
173
+ loading = _b[0],
174
+ setLoading = _b[1];
175
+
176
+ var queryMiniApp = function queryMiniApp(params) {
177
+ return __awaiter(_this, void 0, void 0, function () {
178
+ var res;
179
+ return __generator(this, function (_a) {
180
+ switch (_a.label) {
181
+ case 0:
182
+ setLoading(true);
183
+ return [4
184
+ /*yield*/
185
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/mini/app/list", params, 'GET')];
186
+
187
+ case 1:
188
+ res = _a.sent();
189
+ setMiniAppList(res.list);
190
+ setLoading(false);
191
+ return [2
192
+ /*return*/
193
+ ];
194
+ }
195
+ });
196
+ });
197
+ };
198
+
199
+ (0, _react.useEffect)(function () {
200
+ queryMiniApp({
201
+ state: 'Valid',
202
+ pageSize: 100
203
+ });
204
+ }, []);
205
+ var columns = [{
206
+ title: 'Logo',
207
+ dataIndex: 'logo',
208
+ render: function render(value) {
209
+ return /*#__PURE__*/_react["default"].createElement("img", {
210
+ alt: "",
211
+ src: value.url,
212
+ style: {
213
+ width: 40,
214
+ height: 40
215
+ }
216
+ });
217
+ }
218
+ }, {
219
+ title: 'Store Name',
220
+ dataIndex: 'storeName'
221
+ }, {
222
+ title: 'App Name',
223
+ dataIndex: 'programName'
224
+ }];
225
+ var rowSelection = {
226
+ onChange: function onChange(selectedRowKeys, selectedRows) {
227
+ _onChange({
228
+ value: selectedRows[0].programLink,
229
+ name: selectedRows[0].programName + "(" + selectedRows[0].storeName + ")"
230
+ });
231
+ },
232
+ type: 'radio'
233
+ };
234
+ return /*#__PURE__*/_react["default"].createElement("div", {
235
+ style: {
236
+ height: 550
237
+ }
238
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Table, {
239
+ bordered: false,
240
+ columns: columns,
241
+ dataSource: miniAppList,
242
+ loading: loading,
243
+ pagination: false,
244
+ rowKey: "storeMiniProgramId",
245
+ rowSelection: rowSelection,
246
+ scroll: {
247
+ y: 480
248
+ }
249
+ }));
250
+ }
@@ -29,6 +29,8 @@ var _SelectVideoModal = _interopRequireDefault(require("./SelectVideoModal"));
29
29
 
30
30
  var _ShareUrl = _interopRequireDefault(require("./ShareUrl"));
31
31
 
32
+ var _MiniAppTable = _interopRequireDefault(require("./MiniAppTable"));
33
+
32
34
  var _locale = require("../../locale");
33
35
 
34
36
  var _commonUtil = require("../../utils/commonUtil");
@@ -321,6 +323,10 @@ var LinkModal = function LinkModal(props) {
321
323
  onChange: function onChange(value) {
322
324
  return setLinkUrl(value);
323
325
  }
326
+ }), item.linkTypeCode === 'MiniApp' && /*#__PURE__*/_react["default"].createElement(_MiniAppTable["default"], {
327
+ onChange: function onChange(value) {
328
+ return setLinkUrl(value);
329
+ }
324
330
  }));
325
331
  })), /*#__PURE__*/_react["default"].createElement("div", {
326
332
  className: "footer"
@@ -192,7 +192,8 @@ function (_super) {
192
192
  BannerPc.prototype.render = function () {
193
193
  var _this = this;
194
194
 
195
- var data = this.props.data;
195
+ var data = this.props.data; // console.log('--data banner', data);
196
+
196
197
  var _a = this.state,
197
198
  carouseIndex = _a.carouseIndex,
198
199
  hoverState = _a.hoverState;
@@ -233,6 +234,8 @@ function (_super) {
233
234
  autoplaySpeed: data.setting.autoplay.interval * 1000,
234
235
  dots: false
235
236
  }, data.groupSource.map(function (item, index) {
237
+ var _a, _b;
238
+
236
239
  return /*#__PURE__*/_react["default"].createElement("div", {
237
240
  key: item.id
238
241
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -259,7 +262,8 @@ function (_super) {
259
262
  }), /*#__PURE__*/_react["default"].createElement("div", {
260
263
  className: "carouseContent",
261
264
  style: {
262
- alignItems: _AlignSelector.alignItemMap[item.customize.align]
265
+ alignItems: _AlignSelector.alignItemMap[item.customize.layout],
266
+ textAlign: item.customize.align
263
267
  }
264
268
  }, item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
265
269
  className: "title",
@@ -276,7 +280,11 @@ function (_super) {
276
280
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
277
281
  })
278
282
  }), /*#__PURE__*/_react["default"].createElement("div", {
279
- className: "btn-wrap"
283
+ className: "btn-wrap",
284
+ style: {
285
+ justifyContent: _AlignSelector.alignItemMap[item.customize.align],
286
+ width: Math.max((_a = item.title.content) === null || _a === void 0 ? void 0 : _a.pcWidth, (_b = item.text.content) === null || _b === void 0 ? void 0 : _b.pcWidth) + "%"
287
+ }
280
288
  }, item.button.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
281
289
  className: "btn",
282
290
  data: item.button,
@@ -73,8 +73,8 @@
73
73
  .btn-wrap {
74
74
  display: flex;
75
75
  align-items: center;
76
- justify-content: flex-start;
77
-
76
+ // justify-content: flex-start;
77
+ // width: 100%;
78
78
  .btn {
79
79
  margin-right: 12px;
80
80
  cursor: pointer;
@@ -192,10 +192,10 @@ function (_super) {
192
192
  rowNum = _a.rowNum;
193
193
  var colNum = 1;
194
194
 
195
- if (layout === 'layout1') {
196
- colNum = Math.min(rowNum, data.groupSource.length);
197
- } else if (layout === 'layout3') {
195
+ if (layout === 'layout3') {
198
196
  colNum = Math.min(rowNum + 0.2, data.groupSource.length);
197
+ } else {
198
+ colNum = Math.min(rowNum, data.groupSource.length);
199
199
  }
200
200
 
201
201
  var floorColNum = Math.floor(colNum);
@@ -225,7 +225,7 @@ function (_super) {
225
225
  sliderIndex: newIndex
226
226
  });
227
227
  },
228
- variableWidth: true
228
+ variableWidth: layout === 'layout3'
229
229
  };
230
230
  var dotsSpace = Math.max(data.setting.dots.size, data.setting.dots.hoverSize) + 12 + "px";
231
231
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -202,10 +202,10 @@ function (_super) {
202
202
  pcRowNum = _a.pcRowNum;
203
203
  var colNum = 1;
204
204
 
205
- if (layout === 'layout1') {
206
- colNum = Math.min(pcRowNum, data.groupSource.length);
207
- } else if (layout === 'layout3') {
205
+ if (layout === 'layout3') {
208
206
  colNum = Math.min(pcRowNum + 0.2, data.groupSource.length);
207
+ } else {
208
+ colNum = Math.min(pcRowNum, data.groupSource.length);
209
209
  }
210
210
 
211
211
  var floorColNum = Math.floor(colNum);
@@ -221,6 +221,7 @@ function (_super) {
221
221
  }
222
222
 
223
223
  var settings = {
224
+ infinite: true,
224
225
  className: 'slider-wrap',
225
226
  arrows: false,
226
227
  dots: false,
@@ -235,7 +236,7 @@ function (_super) {
235
236
  sliderIndex: newIndex
236
237
  });
237
238
  },
238
- variableWidth: true
239
+ variableWidth: layout === 'layout3'
239
240
  };
240
241
  var navStyle = {
241
242
  fontSize: (0, _commonUtil.convertToRem)(data.setting.navigation.size),
@@ -21,8 +21,6 @@ var _coreUtil = require("../../../../utils/coreUtil");
21
21
 
22
22
  var _common = require("../../../../common");
23
23
 
24
- var _mobx = require("../../../../mobx");
25
-
26
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
25
 
28
26
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
@@ -53,22 +51,6 @@ var __extends = void 0 && (void 0).__extends || function () {
53
51
  };
54
52
  }();
55
53
 
56
- var __assign = void 0 && (void 0).__assign || function () {
57
- __assign = Object.assign || function (t) {
58
- for (var s, i = 1, n = arguments.length; i < n; i++) {
59
- s = arguments[i];
60
-
61
- for (var p in s) {
62
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
63
- }
64
- }
65
-
66
- return t;
67
- };
68
-
69
- return __assign.apply(this, arguments);
70
- };
71
-
72
54
  var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
73
55
  var c = arguments.length,
74
56
  r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
@@ -92,28 +74,18 @@ function (_super) {
92
74
  };
93
75
 
94
76
  _this.onInit = function (v) {
95
- var _a;
96
-
97
- var _b = _this.props,
98
- component = _b.component,
99
- id = _b.id; // 轮播组件特殊处理
100
-
101
- if (component === 'carousel') {
102
- if (v === 'layout2') {
103
- _this.setState({
104
- showRowNum: false
105
- });
106
- } else {
107
- _this.setState({
108
- showRowNum: true
109
- });
110
- }
111
-
112
- _this.props.store.setState({
113
- CarouselStore: __assign(__assign({}, _mobx.store.CarouselStore), (_a = {}, _a[id] = v, _a))
114
- });
115
- } // 图文组件,移动端,只有第3个组件可选列数
116
-
77
+ var _a = _this.props,
78
+ component = _a.component,
79
+ id = _a.id; // 轮播组件特殊处理
80
+ // if (component === 'carousel') {
81
+ // if (v === 'layout2') {
82
+ // this.setState({ showRowNum: false });
83
+ // } else {
84
+ // this.setState({ showRowNum: true });
85
+ // }
86
+ // this.props.store.setState({ CarouselStore: { ...store.CarouselStore, [id]: v } });
87
+ // }
88
+ // 图文组件,移动端,只有第3个组件可选列数
117
89
 
118
90
  if (component === 'imageText') {
119
91
  if (!(0, _coreUtil.isPc)()) {
@@ -1,5 +1,6 @@
1
1
  .pc-navigation {
2
2
  display: flex;
3
+
3
4
  .menu-wrap {
4
5
  // margin-top: 26px;
5
6
  position: relative;
@@ -7,10 +8,11 @@
7
8
  display: flex;
8
9
  align-items: center;
9
10
  min-width: 130px;
11
+
10
12
  // padding: 40px 0;
11
13
  // margin: -40px 44px -40px 0;
12
14
  &:hover {
13
- @keyframes show-active{
15
+ @keyframes show-active {
14
16
  0% {
15
17
  opacity: 0;
16
18
  }
@@ -19,12 +21,15 @@
19
21
  opacity: 1;
20
22
  }
21
23
  }
24
+
22
25
  .category {
23
26
  display: flex;
27
+
24
28
  &:local {
25
29
  animation: show-active .3s linear both;
26
30
  }
27
31
  }
32
+
28
33
  // 鼠标移上去,icon变色
29
34
  // .menu-drop {
30
35
  // .all-category {
@@ -39,14 +44,18 @@
39
44
  // }
40
45
  // }
41
46
  }
47
+
42
48
  .menu-drop {
43
49
  display: flex;
44
50
  align-items: center;
45
51
  flex-shrink: 0;
46
- &> img {
52
+
53
+ &>img {
47
54
  width: 16px;
48
55
  margin-right: 10px;
56
+ font-size: 16px;
49
57
  }
58
+
50
59
  // &> span {
51
60
  // color: #3A2E2E;
52
61
  // font-family: NunitoSans-Bold;
@@ -54,6 +63,7 @@
54
63
  // line-height: 22px;
55
64
  // }
56
65
  }
66
+
57
67
  .category {
58
68
  display: none;
59
69
  position: absolute;
@@ -61,33 +71,37 @@
61
71
  left: 0;
62
72
  bottom: 3px;
63
73
  transform: translateY(100%);
74
+
64
75
  // :global {
65
- .cate-wrap {
66
- width: 290px;
67
- border: 1px solid #E6EAF0;
68
- padding: 8px 0;
69
- background-color: #fff;
70
- .cate-item {
71
- cursor: pointer;
72
- font-family: 'Open Sans';
73
- font-style: normal;
74
- font-weight: 400;
75
- font-size: 14px;
76
- line-height: 38px;
77
- color: #232F46;
78
- display: flex;
79
- width: 100%;
80
- padding: 0 16px;
81
- justify-content: space-between;
82
- }
76
+ .cate-wrap {
77
+ width: 290px;
78
+ border: 1px solid #E6EAF0;
79
+ padding: 8px 0;
80
+ background-color: #fff;
81
+
82
+ .cate-item {
83
+ cursor: pointer;
84
+ font-family: 'Open Sans';
85
+ font-style: normal;
86
+ font-weight: 400;
87
+ font-size: 14px;
88
+ line-height: 38px;
89
+ color: #232F46;
90
+ display: flex;
91
+ width: 100%;
92
+ padding: 0 16px;
93
+ justify-content: space-between;
94
+ }
83
95
 
84
- .cate-active {
85
- background: #FCF1F2;
86
- &> span {
87
- color: #CE1126 !important;
88
- }
96
+ .cate-active {
97
+ background: #FCF1F2;
98
+
99
+ &>span {
100
+ color: #CE1126 !important;
89
101
  }
90
102
  }
103
+ }
104
+
91
105
  // }
92
106
  }
93
107
  }
@@ -97,16 +111,17 @@
97
111
  overflow-x: auto;
98
112
  flex: 1;
99
113
  scroll-snap-type: x;
114
+
100
115
  .one-category {
101
116
  margin-right: 44px;
102
117
  scroll-snap-align: end;
103
118
  width: fit-content !important;
104
119
  cursor: pointer;
120
+
105
121
  &:last-of-type {
106
122
  margin-right: 0;
107
123
  }
108
124
  }
109
125
  }
110
126
 
111
- }
112
-
127
+ }
@@ -54,7 +54,8 @@ var urlTypeMap = {
54
54
  COUPONS: 'Coupons',
55
55
  BUNDLE_CAMPAIGN: 'BundleCampaign',
56
56
  VIDEO: 'Video',
57
- SHARE_URL: 'ShareURL'
57
+ SHARE_URL: 'ShareURL',
58
+ MINI_APP: 'MiniApp'
58
59
  };
59
60
  exports.urlTypeMap = urlTypeMap;
60
61
  var respCodeMap = {
@@ -121,7 +121,7 @@ function (_super) {
121
121
  } else {
122
122
  if (data.content.h5ImgWidth) obj.width = data.content.h5ImgWidth * scale; // if (data.content.h5ImgHeight) obj.height = data.content.h5ImgHeight * scale;
123
123
 
124
- if (data.content.h5ImgWidth > data.content.h5ImgHeight) {
124
+ if (data.content.h5ImgWidth > data.content.h5ImgHeight || data.content.h5ImgHeight > maxHeight) {
125
125
  obj.height = 'auto';
126
126
  } else if (data.content.h5ImgHeight) obj.height = data.content.h5ImgHeight * scale;
127
127
  }
@@ -96,6 +96,22 @@ function (_super) {
96
96
  data[key] = value;
97
97
 
98
98
  _this.selfRender();
99
+ }; // button 的hover打开时,继承上方的配置内容
100
+
101
+
102
+ _this.hoverClickEvent = function () {
103
+ var data = _this.props.data;
104
+
105
+ _this.updateAttr(data, 'hover', {
106
+ open: true,
107
+ buttonBorder: data.buttonBorder,
108
+ buttonIcon: data.buttonIcon,
109
+ buttonText: data.buttonText,
110
+ content: {
111
+ backgroundColor: data.content.backgroundColor
112
+ }
113
+ }); // console.log('--ffd, button hover first click', data);
114
+
99
115
  };
100
116
 
101
117
  return _this;
@@ -322,7 +338,8 @@ function (_super) {
322
338
  name: (0, _locale.i18n)('HOVER'),
323
339
  value: hoverSetting,
324
340
  toggleType: 'checkbox',
325
- metaOption: data.hover
341
+ metaOption: data.hover,
342
+ checkClick: this.hoverClickEvent
326
343
  });
327
344
  }
328
345
 
@@ -111,6 +111,18 @@ var newParseUrl = function newParseUrl(urlObj) {
111
111
  };
112
112
  break;
113
113
 
114
+ case _constants.urlTypeMap.MINI_APP:
115
+ // 跳转小程序
116
+ link = '';
117
+ params = {
118
+ action: 'jump',
119
+ params: {
120
+ type: 'MINI_APP',
121
+ url: value
122
+ }
123
+ };
124
+ break;
125
+
114
126
  default:
115
127
  var map = {
116
128
  '/main/cart': 'CART',
@@ -266,6 +266,10 @@ function commonFetch(url, data, method) {
266
266
  }
267
267
 
268
268
  var navigateTo = function navigateTo(url) {
269
+ if (!url) {
270
+ return;
271
+ }
272
+
269
273
  if (!window.magicDesign || !window.magicDesign.history) {
270
274
  window.location.href = url;
271
275
  return;