@fonixtree/magic-design 0.0.60 → 0.0.62
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.
- package/es/assets/less/modal.less +7 -2
- package/es/common/ButtonIconLayout/index.less +4 -2
- package/es/common/Collapse/index.js +16 -3
- package/es/common/ImageModal/index.less +6 -1
- package/es/common/UrlPicker/index.js +6 -2
- package/es/common/UrlPicker/index.less +12 -1
- package/es/composite-comp/bol/components/Banner/mobile/index.js +3 -5
- package/es/composite-comp/bol/components/Banner/pc/index.js +3 -2
- package/es/composite-comp/bol/components/ImageText/defaultJSON.js +0 -145
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +3 -1
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +2 -2
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +8 -12
- package/es/composite-comp/dito/components/MobileNavigation/defaultJSON.js +2 -1
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +13 -3
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +3 -2
- package/es/composite-comp/dito/components/PcNavigation/pc/index.js +1 -1
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +20 -4
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
- package/es/composite-comp/dito/components/Recommend/mobile/index.less +14 -7
- package/es/composite-comp/dito/components/Recommend/pc/index.js +4 -2
- package/es/composite-comp/dito/components/Recommend/pc/index.less +14 -7
- package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +8 -1
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +39 -29
- package/es/core/Designer/ConfigPanel/TerminalSelect/index.js +3 -3
- package/es/core/Designer/QuickMenuBar/index.js +3 -9
- package/es/core/Designer/index.js +6 -4
- package/es/decorator/metaDecorator.js +5 -3
- package/es/meta-comp/components/Button/index.less +4 -1
- package/es/meta-comp/components/Image/index.less +1 -0
- package/es/meta-comp/components/Text/index.js +8 -0
- package/es/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +12 -9
- package/es/meta-comp/config-panels/ImageConfig/index.js +4 -0
- package/es/mobx/Store.js +5 -2
- package/es/utils/coreUtil.js +1 -1
- package/lib/assets/less/modal.less +7 -2
- package/lib/common/ButtonIconLayout/index.less +4 -2
- package/lib/common/Collapse/index.js +16 -3
- package/lib/common/ImageModal/index.less +6 -1
- package/lib/common/UrlPicker/index.js +6 -2
- package/lib/common/UrlPicker/index.less +12 -1
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +3 -5
- package/lib/composite-comp/bol/components/Banner/pc/index.js +3 -2
- package/lib/composite-comp/bol/components/ImageText/defaultJSON.js +0 -145
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +3 -1
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +2 -2
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +8 -12
- package/lib/composite-comp/dito/components/MobileNavigation/defaultJSON.js +2 -1
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +13 -3
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +3 -2
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +1 -1
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +20 -4
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
- package/lib/composite-comp/dito/components/Recommend/mobile/index.less +14 -7
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +4 -2
- package/lib/composite-comp/dito/components/Recommend/pc/index.less +14 -7
- package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +8 -1
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +39 -29
- package/lib/core/Designer/ConfigPanel/TerminalSelect/index.js +3 -3
- package/lib/core/Designer/QuickMenuBar/index.js +3 -9
- package/lib/core/Designer/index.js +6 -4
- package/lib/decorator/metaDecorator.js +5 -3
- package/lib/meta-comp/components/Button/index.less +4 -1
- package/lib/meta-comp/components/Image/index.less +1 -0
- package/lib/meta-comp/components/Text/index.js +8 -0
- package/lib/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +12 -9
- package/lib/meta-comp/config-panels/ImageConfig/index.js +4 -0
- package/lib/mobx/Store.js +5 -2
- package/lib/utils/coreUtil.js +1 -1
- package/package.json +1 -86
- package/README.md +0 -320
|
@@ -622,7 +622,7 @@ function (_super) {
|
|
|
622
622
|
scrollToRightDisabled = _a.scrollToRightDisabled;
|
|
623
623
|
var bgStyle = this.getBackgroundStyle();
|
|
624
624
|
var products = this.state["products" + tabIndex] || [];
|
|
625
|
-
var isDivide = groupSource.length <=
|
|
625
|
+
var isDivide = groupSource.length <= 10;
|
|
626
626
|
var layout = panelProps.customize.layout.pcLayout;
|
|
627
627
|
|
|
628
628
|
var _seeAll = (0, _commonUtil.ensure)(function () {
|
|
@@ -716,6 +716,8 @@ function (_super) {
|
|
|
716
716
|
className: (0, _classnames["default"])('scrollContainer', {
|
|
717
717
|
pl_100: layout === 'layout3'
|
|
718
718
|
})
|
|
719
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
720
|
+
className: "productList"
|
|
719
721
|
}, products.map(function (item) {
|
|
720
722
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
721
723
|
className: "productCard"
|
|
@@ -731,7 +733,7 @@ function (_super) {
|
|
|
731
733
|
panelProps: panelProps.content,
|
|
732
734
|
showProgress: false
|
|
733
735
|
}));
|
|
734
|
-
}), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
736
|
+
})), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
735
737
|
className: "btnSeeAll",
|
|
736
738
|
data: _seeAll
|
|
737
739
|
})), layout !== 'layout1' && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
.tabTitle {
|
|
26
26
|
display: flex;
|
|
27
27
|
align-items: center;
|
|
28
|
-
padding: 0 24px;
|
|
28
|
+
// padding: 0 24px;
|
|
29
|
+
min-width: 100px;
|
|
29
30
|
height: 100%;
|
|
30
31
|
justify-content: center;
|
|
31
32
|
white-space: nowrap;
|
|
@@ -87,18 +88,24 @@
|
|
|
87
88
|
.scrollContainer {
|
|
88
89
|
display: flex;
|
|
89
90
|
flex-direction: row;
|
|
90
|
-
align-items:
|
|
91
|
+
align-items: center;
|
|
91
92
|
flex: 1;
|
|
92
93
|
margin: 0;
|
|
93
94
|
overflow-x: auto;
|
|
94
95
|
padding-bottom: 15px;
|
|
95
96
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
.productList {
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: row;
|
|
100
|
+
align-items: flex-start;
|
|
99
101
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
&.pl_100 {
|
|
103
|
+
padding-left: 100px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.productCard {
|
|
107
|
+
margin-right: 20px;
|
|
108
|
+
}
|
|
102
109
|
}
|
|
103
110
|
}
|
|
104
111
|
|
|
@@ -25,6 +25,8 @@ var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
|
|
|
25
25
|
|
|
26
26
|
var _locale = require("../../../../locale");
|
|
27
27
|
|
|
28
|
+
var _mobx = require("../../../../mobx");
|
|
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 () {
|
|
@@ -79,6 +81,10 @@ function (_super) {
|
|
|
79
81
|
_this.selfRender();
|
|
80
82
|
};
|
|
81
83
|
|
|
84
|
+
_this.getIsContentActive = function (content) {
|
|
85
|
+
return JSON.stringify(content).includes(_mobx.store.clickedMetaParent);
|
|
86
|
+
};
|
|
87
|
+
|
|
82
88
|
return _this;
|
|
83
89
|
}
|
|
84
90
|
|
|
@@ -100,7 +106,8 @@ function (_super) {
|
|
|
100
106
|
name: (0, _locale.i18n)('CONTENT'),
|
|
101
107
|
value: /*#__PURE__*/_react["default"].createElement(_RecommendConfigContent["default"], {
|
|
102
108
|
panelProps: data.content
|
|
103
|
-
})
|
|
109
|
+
}),
|
|
110
|
+
active: this.getIsContentActive(data.content)
|
|
104
111
|
}, {
|
|
105
112
|
key: '3',
|
|
106
113
|
name: (0, _locale.i18n)('SPACING'),
|
package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js
CHANGED
|
@@ -215,17 +215,32 @@ function (_super) {
|
|
|
215
215
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
216
216
|
|
|
217
217
|
_this.state = {
|
|
218
|
-
intelligentType:
|
|
219
|
-
|
|
220
|
-
}, 'ALL'),
|
|
221
|
-
intelligentValue: (0, _commonUtil.ensure)(function () {
|
|
222
|
-
return _this.props.value.intelligentValue;
|
|
223
|
-
}, []),
|
|
218
|
+
intelligentType: 'ALL',
|
|
219
|
+
intelligentValue: [],
|
|
224
220
|
categoryData: [],
|
|
225
221
|
brandData: [],
|
|
226
222
|
labelData: []
|
|
227
223
|
};
|
|
228
224
|
|
|
225
|
+
_this.onChangeIntelligentType = function (type) {
|
|
226
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
227
|
+
return __generator(this, function (_a) {
|
|
228
|
+
this.setState({
|
|
229
|
+
intelligentType: type,
|
|
230
|
+
intelligentValue: []
|
|
231
|
+
});
|
|
232
|
+
this.getTypeData(type);
|
|
233
|
+
this.props.onChange({
|
|
234
|
+
intelligentType: type,
|
|
235
|
+
intelligentValue: []
|
|
236
|
+
});
|
|
237
|
+
return [2
|
|
238
|
+
/*return*/
|
|
239
|
+
];
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
|
|
229
244
|
_this.getTypeData = function (type) {
|
|
230
245
|
return __awaiter(_this, void 0, void 0, function () {
|
|
231
246
|
var res, res, res;
|
|
@@ -298,34 +313,29 @@ function (_super) {
|
|
|
298
313
|
});
|
|
299
314
|
};
|
|
300
315
|
|
|
301
|
-
_this.onChangeIntelligentType = function (type) {
|
|
302
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
303
|
-
return __generator(this, function (_a) {
|
|
304
|
-
this.setState({
|
|
305
|
-
intelligentType: type,
|
|
306
|
-
intelligentValue: []
|
|
307
|
-
});
|
|
308
|
-
this.props.onChange({
|
|
309
|
-
intelligentType: type,
|
|
310
|
-
intelligentValue: []
|
|
311
|
-
});
|
|
312
|
-
this.getTypeData(type);
|
|
313
|
-
return [2
|
|
314
|
-
/*return*/
|
|
315
|
-
];
|
|
316
|
-
});
|
|
317
|
-
});
|
|
318
|
-
};
|
|
319
|
-
|
|
320
316
|
return _this;
|
|
321
317
|
}
|
|
322
318
|
|
|
323
319
|
AIRecommendation.prototype.componentDidMount = function () {
|
|
324
|
-
this.props.
|
|
325
|
-
|
|
326
|
-
|
|
320
|
+
var _a = this.props.value,
|
|
321
|
+
intelligentType = _a.intelligentType,
|
|
322
|
+
intelligentValue = _a.intelligentValue;
|
|
323
|
+
this.getTypeData(intelligentType);
|
|
324
|
+
this.setState({
|
|
325
|
+
intelligentType: intelligentType,
|
|
326
|
+
intelligentValue: intelligentValue
|
|
327
|
+
});
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
AIRecommendation.prototype.componentWillReceiveProps = function (nextProps) {
|
|
331
|
+
var _a = nextProps.value,
|
|
332
|
+
intelligentType = _a.intelligentType,
|
|
333
|
+
intelligentValue = _a.intelligentValue;
|
|
334
|
+
this.getTypeData(intelligentType);
|
|
335
|
+
this.setState({
|
|
336
|
+
intelligentType: intelligentType,
|
|
337
|
+
intelligentValue: intelligentValue
|
|
327
338
|
});
|
|
328
|
-
this.getTypeData(this.state.intelligentType);
|
|
329
339
|
};
|
|
330
340
|
|
|
331
341
|
AIRecommendation.prototype.render = function () {
|
|
@@ -17,8 +17,8 @@ function TerminalSelect(_a) {
|
|
|
17
17
|
var value = _a.value,
|
|
18
18
|
onChange = _a.onChange,
|
|
19
19
|
terminalType = _a.terminalType;
|
|
20
|
-
var isActiveMobile = ['MOBILE', 'ALL'].includes(value);
|
|
21
|
-
var isActivePc = ['PC', 'ALL'].includes(value);
|
|
20
|
+
var isActiveMobile = !value || ['MOBILE', 'ALL'].includes(value);
|
|
21
|
+
var isActivePc = !value || ['PC', 'ALL'].includes(value);
|
|
22
22
|
|
|
23
23
|
var onTerminalClick = function onTerminalClick(terminal) {
|
|
24
24
|
// 至少选中一种终端
|
|
@@ -26,7 +26,7 @@ function TerminalSelect(_a) {
|
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
if (value === 'ALL') {
|
|
29
|
+
if (!value || value === 'ALL') {
|
|
30
30
|
if (terminal === 'PC') {
|
|
31
31
|
onChange('MOBILE');
|
|
32
32
|
} else {
|
|
@@ -11,8 +11,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
|
|
14
|
-
var _mobx = require("../../../mobx");
|
|
15
|
-
|
|
16
14
|
var _Button = _interopRequireDefault(require("../../../common/Button"));
|
|
17
15
|
|
|
18
16
|
var _Iconfont = _interopRequireDefault(require("../../../common/Iconfont"));
|
|
@@ -82,13 +80,9 @@ function (_super) {
|
|
|
82
80
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
83
81
|
|
|
84
82
|
_this.onBtnClick = function (event) {
|
|
85
|
-
var code = event.currentTarget.dataset.code;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
_mobx.store.setState({
|
|
89
|
-
clickedFloor: ''
|
|
90
|
-
});
|
|
91
|
-
}
|
|
83
|
+
var code = event.currentTarget.dataset.code; // if (code === quickMenuCode.SAVE || code === quickMenuCode.PUBLISH) {
|
|
84
|
+
// store.setState({ clickedFloor: '' });
|
|
85
|
+
// }
|
|
92
86
|
|
|
93
87
|
if (_this.props.device === _constants.deviceTypeMap.PC) {}
|
|
94
88
|
|
|
@@ -97,11 +97,13 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
97
97
|
return r;
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
+
window.magicDesign = {
|
|
101
|
+
mode: 'designer',
|
|
102
|
+
device: _constants.deviceTypeMap.PHONE
|
|
103
|
+
};
|
|
104
|
+
|
|
100
105
|
var setDesignConfig = function setDesignConfig(data) {
|
|
101
|
-
window.magicDesign = __assign(__assign({
|
|
102
|
-
mode: 'designer',
|
|
103
|
-
device: _constants.deviceTypeMap.PHONE
|
|
104
|
-
}, data), {
|
|
106
|
+
window.magicDesign = __assign(__assign(__assign({}, window.magicDesign), data), {
|
|
105
107
|
MBaseUrl: data.MBaseUrl || ''
|
|
106
108
|
});
|
|
107
109
|
};
|
|
@@ -79,7 +79,8 @@ function metaDecorator(WrappedComponent) {
|
|
|
79
79
|
event.preventDefault();
|
|
80
80
|
event.stopPropagation();
|
|
81
81
|
var parentId = (_a = _this.props.data) === null || _a === void 0 ? void 0 : _a.parentId;
|
|
82
|
-
var
|
|
82
|
+
var conentId = (_b = _this.props.data) === null || _b === void 0 ? void 0 : _b.contentId;
|
|
83
|
+
var metaId = (_c = _this.props.data) === null || _c === void 0 ? void 0 : _c.id;
|
|
83
84
|
var floorId = null; // group中的元组件
|
|
84
85
|
|
|
85
86
|
if (parentId) {
|
|
@@ -90,9 +91,10 @@ function metaDecorator(WrappedComponent) {
|
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
_mobx.store.setState({
|
|
93
|
-
clickedMeta:
|
|
94
|
+
clickedMeta: metaId,
|
|
94
95
|
clickedGroup: parentId,
|
|
95
|
-
clickedFloor: floorId
|
|
96
|
+
clickedFloor: floorId,
|
|
97
|
+
clickedMetaParent: conentId
|
|
96
98
|
});
|
|
97
99
|
};
|
|
98
100
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
.btnContent {
|
|
5
5
|
width: 100%;
|
|
6
6
|
cursor: pointer;
|
|
7
|
-
display:
|
|
7
|
+
display: flex;
|
|
8
8
|
align-items: center;
|
|
9
9
|
justify-content: center;
|
|
10
10
|
flex-direction: column;
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
|
|
16
16
|
.item {
|
|
17
17
|
width: 100%;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
img {
|
|
@@ -439,6 +439,14 @@ function (_super) {
|
|
|
439
439
|
textDecorationColor: data.underline.textDecorationColor,
|
|
440
440
|
textDecorationStyle: data.underline.textDecorationStyle
|
|
441
441
|
});
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
if (data === null || data === void 0 ? void 0 : data.spacing) {
|
|
445
|
+
if ((0, _coreUtil.isPc)()) {
|
|
446
|
+
style = __assign(__assign({}, style), data.spacing.pc);
|
|
447
|
+
} else {
|
|
448
|
+
style = __assign(__assign({}, style), data.spacing.mobile);
|
|
449
|
+
}
|
|
442
450
|
} // const style: React.CSSProperties = {
|
|
443
451
|
// ...contentStyle(data.content),
|
|
444
452
|
// textDecorationLine: data?.underline.open ? 'underline' : 'none',
|
|
@@ -53,12 +53,12 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
53
53
|
};
|
|
54
54
|
}();
|
|
55
55
|
|
|
56
|
-
var
|
|
56
|
+
var HotAreaConfig =
|
|
57
57
|
/** @class */
|
|
58
58
|
function (_super) {
|
|
59
|
-
__extends(
|
|
59
|
+
__extends(HotAreaConfig, _super);
|
|
60
60
|
|
|
61
|
-
function
|
|
61
|
+
function HotAreaConfig() {
|
|
62
62
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
63
63
|
|
|
64
64
|
_this.state = {
|
|
@@ -66,11 +66,14 @@ function (_super) {
|
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
_this.onCheckboxChange = function (e) {
|
|
69
|
-
var
|
|
69
|
+
var _a = _this.props,
|
|
70
|
+
option = _a.option,
|
|
71
|
+
onChange = _a.onChange;
|
|
70
72
|
console.log(e.target.checked);
|
|
71
|
-
option.
|
|
73
|
+
option.clickUrl = '';
|
|
74
|
+
option.openHotArea = e.target.checked; // this.setState({});
|
|
72
75
|
|
|
73
|
-
|
|
76
|
+
onChange();
|
|
74
77
|
};
|
|
75
78
|
|
|
76
79
|
_this.onAddArea = function () {
|
|
@@ -100,7 +103,7 @@ function (_super) {
|
|
|
100
103
|
return _this;
|
|
101
104
|
}
|
|
102
105
|
|
|
103
|
-
|
|
106
|
+
HotAreaConfig.prototype.render = function () {
|
|
104
107
|
var option = this.props.option;
|
|
105
108
|
var visible = this.state.visible;
|
|
106
109
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -123,8 +126,8 @@ function (_super) {
|
|
|
123
126
|
}));
|
|
124
127
|
};
|
|
125
128
|
|
|
126
|
-
return
|
|
129
|
+
return HotAreaConfig;
|
|
127
130
|
}(_react.Component);
|
|
128
131
|
|
|
129
|
-
var _default =
|
|
132
|
+
var _default = HotAreaConfig;
|
|
130
133
|
exports["default"] = _default;
|
|
@@ -314,10 +314,14 @@ function (_super) {
|
|
|
314
314
|
value: selectImg
|
|
315
315
|
}), selectImg && /*#__PURE__*/_react["default"].createElement(_HotAreaConfig["default"], {
|
|
316
316
|
imgUrl: selectImg,
|
|
317
|
+
onChange: function onChange() {
|
|
318
|
+
return _this.setState({});
|
|
319
|
+
},
|
|
317
320
|
option: data.content
|
|
318
321
|
}), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
319
322
|
title: "URL"
|
|
320
323
|
}, /*#__PURE__*/_react["default"].createElement(_common.UrlPicker, {
|
|
324
|
+
disabled: data.content.openHotArea,
|
|
321
325
|
onChange: function onChange(v) {
|
|
322
326
|
data.content.clickUrl = v;
|
|
323
327
|
|
package/es/mobx/Store.js
CHANGED
|
@@ -14,7 +14,7 @@ var _storeUtil = require("../utils/storeUtil");
|
|
|
14
14
|
var debug = require('debug')('worker:mobx');
|
|
15
15
|
|
|
16
16
|
var CACHE_KEY = 'STORE';
|
|
17
|
-
var whiteList = ['hoveredMeta', 'clickedMeta', 'clickedGroup', 'clickedFloor', 'textSelection', 'MPageData'];
|
|
17
|
+
var whiteList = ['hoveredMeta', 'clickedMeta', 'clickedGroup', 'clickedMetaParent', 'clickedFloor', 'textSelection', 'MPageData'];
|
|
18
18
|
|
|
19
19
|
var Store =
|
|
20
20
|
/** @class */
|
|
@@ -26,7 +26,9 @@ function () {
|
|
|
26
26
|
|
|
27
27
|
this.clickedMeta = ''; // 点击的元组件Id
|
|
28
28
|
|
|
29
|
-
this.clickedGroup = ''; //
|
|
29
|
+
this.clickedGroup = ''; // 点击的元组的上一层Id,即groupSourceId(元组件在Group中)
|
|
30
|
+
|
|
31
|
+
this.clickedMetaParent = ''; // 点击的元组的上一层Id(元组件不在Group中,Recommend组件)
|
|
30
32
|
|
|
31
33
|
this.clickedFloor = ''; // 点击的楼层Id
|
|
32
34
|
|
|
@@ -42,6 +44,7 @@ function () {
|
|
|
42
44
|
hoveredMeta: _mobx.observable,
|
|
43
45
|
clickedMeta: _mobx.observable,
|
|
44
46
|
clickedGroup: _mobx.observable,
|
|
47
|
+
clickedMetaParent: _mobx.observable,
|
|
45
48
|
clickedFloor: _mobx.observable,
|
|
46
49
|
CarouselStore: _mobx.observable,
|
|
47
50
|
setState: _mobx.action.bound
|
package/es/utils/coreUtil.js
CHANGED
|
@@ -35,7 +35,7 @@ var _this = void 0;
|
|
|
35
35
|
|
|
36
36
|
/** 根据楼层设置的终端类型,判断是否展示该楼层 */
|
|
37
37
|
var isActiveFloor = function isActiveFloor(activeTerminal) {
|
|
38
|
-
return activeTerminal === 'ALL' || activeTerminal === window.magicDesign.device.toUpperCase();
|
|
38
|
+
return !activeTerminal || activeTerminal === 'ALL' || activeTerminal === window.magicDesign.device.toUpperCase();
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
exports.isActiveFloor = isActiveFloor;
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
[magic_design] .ant-modal-wrap {
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
|
+
|
|
4
5
|
.ant-modal {
|
|
5
6
|
width: 100%;
|
|
6
7
|
top: 0 !important;
|
|
7
|
-
padding-bottom:
|
|
8
|
+
padding-bottom: 0px !important;
|
|
9
|
+
|
|
8
10
|
.ant-modal-content {
|
|
9
11
|
border-radius: 8px !important;
|
|
12
|
+
|
|
10
13
|
.ant-modal-header {
|
|
11
14
|
border-top-left-radius: 8px !important;
|
|
12
15
|
border-top-right-radius: 8px !important;
|
|
13
16
|
}
|
|
17
|
+
|
|
14
18
|
.ant-modal-body {
|
|
15
19
|
padding: 16px 16px 12px 16px !important;
|
|
20
|
+
max-height: 800px !important;
|
|
16
21
|
}
|
|
17
22
|
}
|
|
18
23
|
}
|
|
19
|
-
}
|
|
24
|
+
}
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
display: inline-flex;
|
|
8
8
|
align-items: center;
|
|
9
9
|
justify-content: center;
|
|
10
|
-
width: 94px;
|
|
11
|
-
height: 50px;
|
|
10
|
+
min-width: 94px;
|
|
11
|
+
min-height: 50px;
|
|
12
|
+
padding: 6px 10px;
|
|
13
|
+
box-sizing: border-box;
|
|
12
14
|
background: #FFFFFF;
|
|
13
15
|
border: 1px solid #D2D9E5;
|
|
14
16
|
border-radius: 8px;
|
|
@@ -94,8 +94,19 @@ function (_super) {
|
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
var activeItem = source.find(function (src) {
|
|
98
|
+
return src.active;
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
if (activeItem) {
|
|
102
|
+
actives.push(activeItem.key);
|
|
103
|
+
|
|
104
|
+
_this.setState({
|
|
105
|
+
activeKey: actives
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
return;
|
|
109
|
+
} else if (type === 'switch') {
|
|
99
110
|
var first = source.find(function (src) {
|
|
100
111
|
var _a;
|
|
101
112
|
|
|
@@ -324,10 +335,12 @@ function (_super) {
|
|
|
324
335
|
var _this = this;
|
|
325
336
|
|
|
326
337
|
this.distroy = (0, _mobx.autorun)(function () {
|
|
327
|
-
if (_this.props.type === 'switch'
|
|
338
|
+
if (_mobx.store.clickedMeta && _this.props.type === 'switch') {
|
|
328
339
|
_this.setState({
|
|
329
340
|
activeKey: [_mobx.store.clickedMeta]
|
|
330
341
|
});
|
|
342
|
+
} else if (_mobx.store.clickedMeta && _this.props.type === 'triangle') {
|
|
343
|
+
_this.initActive(_this.props);
|
|
331
344
|
}
|
|
332
345
|
});
|
|
333
346
|
}; // componentWillReceiveProps(nextProps) {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
.catg_tree_container {
|
|
2
|
+
.search_container {
|
|
3
|
+
margin-bottom: 15px;
|
|
4
|
+
}
|
|
5
|
+
|
|
2
6
|
.ant-tree-title {
|
|
3
7
|
max-width: 200px;
|
|
4
8
|
overflow: hidden;
|
|
@@ -13,9 +17,10 @@
|
|
|
13
17
|
display: flex;
|
|
14
18
|
flex-wrap: wrap;
|
|
15
19
|
}
|
|
20
|
+
|
|
16
21
|
.ant-upload-list-item-thumbnail {
|
|
17
22
|
img {
|
|
18
23
|
object-fit: contain;
|
|
19
24
|
}
|
|
20
25
|
}
|
|
21
|
-
}
|
|
26
|
+
}
|
|
@@ -63,10 +63,13 @@ function (_super) {
|
|
|
63
63
|
var visible = this.state.visible;
|
|
64
64
|
var _a = this.props,
|
|
65
65
|
value = _a.value,
|
|
66
|
-
_onChange = _a.onChange
|
|
66
|
+
_onChange = _a.onChange,
|
|
67
|
+
disabled = _a.disabled;
|
|
67
68
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
68
69
|
className: "m-url-picker"
|
|
69
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
|
+
}, disabled && /*#__PURE__*/_react["default"].createElement("div", {
|
|
71
|
+
className: "disabled"
|
|
72
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
73
|
className: "input-url"
|
|
71
74
|
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
72
75
|
onChange: function onChange(e) {
|
|
@@ -112,6 +115,7 @@ function (_super) {
|
|
|
112
115
|
|
|
113
116
|
UrlPicker.defaultProps = {
|
|
114
117
|
value: '',
|
|
118
|
+
disabled: false,
|
|
115
119
|
onChange: function onChange() {}
|
|
116
120
|
};
|
|
117
121
|
return UrlPicker;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
.m-url-picker {
|
|
2
|
-
|
|
2
|
+
position: relative;
|
|
3
|
+
.disabled {
|
|
4
|
+
position: absolute;
|
|
5
|
+
left: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
bottom: 0;
|
|
8
|
+
top: 0;
|
|
9
|
+
background-color: #D2D9E5;
|
|
10
|
+
z-index: 1;
|
|
11
|
+
opacity: 0.5;
|
|
12
|
+
border-radius: 8px;
|
|
13
|
+
}
|
|
3
14
|
.input-url {
|
|
4
15
|
width: 100%;
|
|
5
16
|
height: 40px;
|
|
@@ -59,8 +59,7 @@ function (_super) {
|
|
|
59
59
|
|
|
60
60
|
_this.state = {
|
|
61
61
|
carouseIndex: 0,
|
|
62
|
-
hoverState: false
|
|
63
|
-
clickedGroup: ''
|
|
62
|
+
hoverState: false
|
|
64
63
|
};
|
|
65
64
|
_this.carouselRef = /*#__PURE__*/_react["default"].createRef();
|
|
66
65
|
_this.destroy = null;
|
|
@@ -120,12 +119,11 @@ function (_super) {
|
|
|
120
119
|
var data = this.props.data;
|
|
121
120
|
var _a = this.state,
|
|
122
121
|
carouseIndex = _a.carouseIndex,
|
|
123
|
-
hoverState = _a.hoverState
|
|
124
|
-
clickedGroup = _a.clickedGroup;
|
|
122
|
+
hoverState = _a.hoverState;
|
|
125
123
|
var autoplay = data.setting.autoplay.open;
|
|
126
124
|
/** 设计器模式下 如果选中特定group 自动播放关闭 */
|
|
127
125
|
|
|
128
|
-
if ((0, _coreUtil.isDesignMode)() && clickedGroup) {
|
|
126
|
+
if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
|
|
129
127
|
autoplay = false;
|
|
130
128
|
}
|
|
131
129
|
|
|
@@ -23,6 +23,8 @@ var _AlignSelector = require("../../../../../common/AlignSelector");
|
|
|
23
23
|
|
|
24
24
|
var _common = require("../../../../../common");
|
|
25
25
|
|
|
26
|
+
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
27
|
+
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
29
|
|
|
28
30
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -125,8 +127,7 @@ function (_super) {
|
|
|
125
127
|
};
|
|
126
128
|
|
|
127
129
|
if (item.background.bgType === 'color') {
|
|
128
|
-
bgStyle.
|
|
129
|
-
bgStyle.backgroundColor = item.background.color;
|
|
130
|
+
bgStyle.backgroundColor = (0, _commonUtil.getColorRgba)(item.background.color || '#fff', item.background.opacity / 100 || 1);
|
|
130
131
|
} else {
|
|
131
132
|
bgStyle.backgroundImage = "url(" + item.background.image + ")";
|
|
132
133
|
}
|