@fonixtree/magic-design 0.0.45 → 0.0.46
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/common/ProductSource/index.js +1 -3
- package/es/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/es/composite-comp/common/components/ImageLabel/index.less +6 -2
- package/es/composite-comp/dito/components/Recommend/pc/index.js +5 -3
- package/es/composite-comp/dito/components/Recommend/pc/index.less +4 -1
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +19 -15
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +14 -1
- package/lib/common/ProductSource/index.js +1 -3
- package/lib/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/lib/composite-comp/common/components/ImageLabel/index.less +6 -2
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +5 -3
- package/lib/composite-comp/dito/components/Recommend/pc/index.less +4 -1
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +19 -15
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +14 -1
- package/package.json +1 -1
|
@@ -240,9 +240,7 @@ function ProductSource(_a) {
|
|
|
240
240
|
type: "primary"
|
|
241
241
|
}, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
242
242
|
className: "total"
|
|
243
|
-
}, (
|
|
244
|
-
count: getLength()
|
|
245
|
-
})), visible && /*#__PURE__*/_react["default"].createElement(_ProductModal["default"], {
|
|
243
|
+
}, "Total " + getLength() + " products"), visible && /*#__PURE__*/_react["default"].createElement(_ProductModal["default"], {
|
|
246
244
|
closeModal: function closeModal() {
|
|
247
245
|
return setVisbile(false);
|
|
248
246
|
},
|
|
@@ -71,14 +71,14 @@ function (_super) {
|
|
|
71
71
|
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
72
72
|
key: label.imgUrl || label.labelPictureUrl,
|
|
73
73
|
alt: "img",
|
|
74
|
-
className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + label.position] = true, _a.small = small, _a)),
|
|
74
|
+
className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + (label.position || 'null')] = true, _a.small = small, _a)),
|
|
75
75
|
src: label.imgUrl || label.labelPictureUrl
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
80
|
key: label.labelName,
|
|
81
|
-
className: (0, _classnames["default"])('image-label-wrap', (_b = {}, _b["position-" + label.position] = true, _b))
|
|
81
|
+
className: (0, _classnames["default"])('image-label-wrap', (_b = {}, _b["position-" + (label.position || 'null')] = true, _b))
|
|
82
82
|
}, label.labelName);
|
|
83
83
|
});
|
|
84
84
|
};
|
|
@@ -228,7 +228,7 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
228
228
|
|
|
229
229
|
var LAYOUT_IMAGE_SIZE = {
|
|
230
230
|
layout1: {
|
|
231
|
-
w:
|
|
231
|
+
w: '100%',
|
|
232
232
|
h: 180
|
|
233
233
|
},
|
|
234
234
|
layout2: {
|
|
@@ -524,7 +524,7 @@ function (_super) {
|
|
|
524
524
|
hideTabs: hideTabs
|
|
525
525
|
});
|
|
526
526
|
});
|
|
527
|
-
var curLayout = panelProps.customize
|
|
527
|
+
var curLayout = JSON.stringify(panelProps.customize);
|
|
528
528
|
|
|
529
529
|
if (curLayout !== this.preLayout) {
|
|
530
530
|
this.resetLayout();
|
|
@@ -615,7 +615,9 @@ function (_super) {
|
|
|
615
615
|
showProgress: false
|
|
616
616
|
});
|
|
617
617
|
})), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
618
|
-
className: "btnSeeAll
|
|
618
|
+
className: (0, _classnames["default"])('btnSeeAll', {
|
|
619
|
+
line: layout === 'layout1'
|
|
620
|
+
}),
|
|
619
621
|
data: _seeAll
|
|
620
622
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
621
623
|
key: "scrollContainer",
|
|
@@ -25,6 +25,8 @@ var _BaseConfig = _interopRequireDefault(require("../../../../meta-comp/config-p
|
|
|
25
25
|
|
|
26
26
|
var _coreUtil = require("../../../../utils/coreUtil");
|
|
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 () {
|
|
@@ -74,8 +76,9 @@ function (_super) {
|
|
|
74
76
|
};
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
var productSource = /*#__PURE__*/_react["default"].createElement(
|
|
78
|
-
|
|
79
|
+
var productSource = /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
|
+
className: "sourceOfProduct"
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
79
82
|
title: (0, _locale.i18n)('SOURCE_OF_PRODUCT')
|
|
80
83
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
81
84
|
onChange: function onChange(v) {
|
|
@@ -88,7 +91,9 @@ function (_super) {
|
|
|
88
91
|
value: "select"
|
|
89
92
|
}, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
90
93
|
value: "recommend"
|
|
91
|
-
}, (0, _locale.i18n)('AI_RECOMMENDATION')))),
|
|
94
|
+
}, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
95
|
+
className: "greyBg"
|
|
96
|
+
}, panelProps.sourceType === 'select' && /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
|
|
92
97
|
onChange: function onChange(v) {
|
|
93
98
|
panelProps.prodIds = v;
|
|
94
99
|
|
|
@@ -107,7 +112,6 @@ function (_super) {
|
|
|
107
112
|
intelligentValue: panelProps.intelligentValue
|
|
108
113
|
}
|
|
109
114
|
}), panelProps.sourceType === 'recommend' && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
110
|
-
split: "dashed",
|
|
111
115
|
title: (0, _locale.i18n)('PRODUCT_QUANTITY')
|
|
112
116
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
|
|
113
117
|
onChange: function onChange(e) {
|
|
@@ -124,7 +128,7 @@ function (_super) {
|
|
|
124
128
|
value: 50
|
|
125
129
|
}, "\u226450"), /*#__PURE__*/_react["default"].createElement(_antd.Radio, {
|
|
126
130
|
value: 100
|
|
127
|
-
}, "\u2264100"))));
|
|
131
|
+
}, "\u2264100")))));
|
|
128
132
|
|
|
129
133
|
var hoverSetting = /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
130
134
|
divider: "dashed",
|
|
@@ -167,16 +171,8 @@ function (_super) {
|
|
|
167
171
|
data: panelProps.seeAll
|
|
168
172
|
}),
|
|
169
173
|
metaOption: panelProps.seeAll
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
name: (0, _locale.i18n)('SECOND_CATEGORY'),
|
|
173
|
-
value: productSource,
|
|
174
|
-
toggleType: 'arrow',
|
|
175
|
-
metaOption: {
|
|
176
|
-
id: 'productSource',
|
|
177
|
-
open: true
|
|
178
|
-
}
|
|
179
|
-
}, {
|
|
174
|
+
}];
|
|
175
|
+
var hoverSource = [{
|
|
180
176
|
key: 'defaultSource_5',
|
|
181
177
|
name: (0, _locale.i18n)('HOVER'),
|
|
182
178
|
value: hoverSetting,
|
|
@@ -191,6 +187,14 @@ function (_super) {
|
|
|
191
187
|
showActiveColor: true,
|
|
192
188
|
source: defaultSource,
|
|
193
189
|
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"
|
|
194
198
|
}));
|
|
195
199
|
};
|
|
196
200
|
|
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
.recommend_second_conf_wrap {
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
.sourceOfProduct {
|
|
4
|
+
border-top: 1px solid #D2D9E5;
|
|
5
|
+
border-bottom: 1px solid #D2D9E5;
|
|
6
|
+
padding-top: 20px;
|
|
7
|
+
padding-bottom: 20px;
|
|
8
|
+
|
|
9
|
+
.greyBg {
|
|
10
|
+
background: #F5F6F7;
|
|
11
|
+
border-radius: 6px;
|
|
12
|
+
padding: 12px;
|
|
13
|
+
padding-bottom: 1px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
3
16
|
}
|
|
@@ -240,9 +240,7 @@ function ProductSource(_a) {
|
|
|
240
240
|
type: "primary"
|
|
241
241
|
}, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
242
242
|
className: "total"
|
|
243
|
-
}, (
|
|
244
|
-
count: getLength()
|
|
245
|
-
})), visible && /*#__PURE__*/_react["default"].createElement(_ProductModal["default"], {
|
|
243
|
+
}, "Total " + getLength() + " products"), visible && /*#__PURE__*/_react["default"].createElement(_ProductModal["default"], {
|
|
246
244
|
closeModal: function closeModal() {
|
|
247
245
|
return setVisbile(false);
|
|
248
246
|
},
|
|
@@ -71,14 +71,14 @@ function (_super) {
|
|
|
71
71
|
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
72
72
|
key: label.imgUrl || label.labelPictureUrl,
|
|
73
73
|
alt: "img",
|
|
74
|
-
className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + label.position] = true, _a.small = small, _a)),
|
|
74
|
+
className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + (label.position || 'null')] = true, _a.small = small, _a)),
|
|
75
75
|
src: label.imgUrl || label.labelPictureUrl
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
80
|
key: label.labelName,
|
|
81
|
-
className: (0, _classnames["default"])('image-label-wrap', (_b = {}, _b["position-" + label.position] = true, _b))
|
|
81
|
+
className: (0, _classnames["default"])('image-label-wrap', (_b = {}, _b["position-" + (label.position || 'null')] = true, _b))
|
|
82
82
|
}, label.labelName);
|
|
83
83
|
});
|
|
84
84
|
};
|
|
@@ -228,7 +228,7 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
228
228
|
|
|
229
229
|
var LAYOUT_IMAGE_SIZE = {
|
|
230
230
|
layout1: {
|
|
231
|
-
w:
|
|
231
|
+
w: '100%',
|
|
232
232
|
h: 180
|
|
233
233
|
},
|
|
234
234
|
layout2: {
|
|
@@ -524,7 +524,7 @@ function (_super) {
|
|
|
524
524
|
hideTabs: hideTabs
|
|
525
525
|
});
|
|
526
526
|
});
|
|
527
|
-
var curLayout = panelProps.customize
|
|
527
|
+
var curLayout = JSON.stringify(panelProps.customize);
|
|
528
528
|
|
|
529
529
|
if (curLayout !== this.preLayout) {
|
|
530
530
|
this.resetLayout();
|
|
@@ -615,7 +615,9 @@ function (_super) {
|
|
|
615
615
|
showProgress: false
|
|
616
616
|
});
|
|
617
617
|
})), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
618
|
-
className: "btnSeeAll
|
|
618
|
+
className: (0, _classnames["default"])('btnSeeAll', {
|
|
619
|
+
line: layout === 'layout1'
|
|
620
|
+
}),
|
|
619
621
|
data: _seeAll
|
|
620
622
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
621
623
|
key: "scrollContainer",
|
|
@@ -25,6 +25,8 @@ var _BaseConfig = _interopRequireDefault(require("../../../../meta-comp/config-p
|
|
|
25
25
|
|
|
26
26
|
var _coreUtil = require("../../../../utils/coreUtil");
|
|
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 () {
|
|
@@ -74,8 +76,9 @@ function (_super) {
|
|
|
74
76
|
};
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
var productSource = /*#__PURE__*/_react["default"].createElement(
|
|
78
|
-
|
|
79
|
+
var productSource = /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
|
+
className: "sourceOfProduct"
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
79
82
|
title: (0, _locale.i18n)('SOURCE_OF_PRODUCT')
|
|
80
83
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
81
84
|
onChange: function onChange(v) {
|
|
@@ -88,7 +91,9 @@ function (_super) {
|
|
|
88
91
|
value: "select"
|
|
89
92
|
}, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
90
93
|
value: "recommend"
|
|
91
|
-
}, (0, _locale.i18n)('AI_RECOMMENDATION')))),
|
|
94
|
+
}, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
95
|
+
className: "greyBg"
|
|
96
|
+
}, panelProps.sourceType === 'select' && /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
|
|
92
97
|
onChange: function onChange(v) {
|
|
93
98
|
panelProps.prodIds = v;
|
|
94
99
|
|
|
@@ -107,7 +112,6 @@ function (_super) {
|
|
|
107
112
|
intelligentValue: panelProps.intelligentValue
|
|
108
113
|
}
|
|
109
114
|
}), panelProps.sourceType === 'recommend' && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
110
|
-
split: "dashed",
|
|
111
115
|
title: (0, _locale.i18n)('PRODUCT_QUANTITY')
|
|
112
116
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
|
|
113
117
|
onChange: function onChange(e) {
|
|
@@ -124,7 +128,7 @@ function (_super) {
|
|
|
124
128
|
value: 50
|
|
125
129
|
}, "\u226450"), /*#__PURE__*/_react["default"].createElement(_antd.Radio, {
|
|
126
130
|
value: 100
|
|
127
|
-
}, "\u2264100"))));
|
|
131
|
+
}, "\u2264100")))));
|
|
128
132
|
|
|
129
133
|
var hoverSetting = /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
130
134
|
divider: "dashed",
|
|
@@ -167,16 +171,8 @@ function (_super) {
|
|
|
167
171
|
data: panelProps.seeAll
|
|
168
172
|
}),
|
|
169
173
|
metaOption: panelProps.seeAll
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
name: (0, _locale.i18n)('SECOND_CATEGORY'),
|
|
173
|
-
value: productSource,
|
|
174
|
-
toggleType: 'arrow',
|
|
175
|
-
metaOption: {
|
|
176
|
-
id: 'productSource',
|
|
177
|
-
open: true
|
|
178
|
-
}
|
|
179
|
-
}, {
|
|
174
|
+
}];
|
|
175
|
+
var hoverSource = [{
|
|
180
176
|
key: 'defaultSource_5',
|
|
181
177
|
name: (0, _locale.i18n)('HOVER'),
|
|
182
178
|
value: hoverSetting,
|
|
@@ -191,6 +187,14 @@ function (_super) {
|
|
|
191
187
|
showActiveColor: true,
|
|
192
188
|
source: defaultSource,
|
|
193
189
|
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"
|
|
194
198
|
}));
|
|
195
199
|
};
|
|
196
200
|
|
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
.recommend_second_conf_wrap {
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
.sourceOfProduct {
|
|
4
|
+
border-top: 1px solid #D2D9E5;
|
|
5
|
+
border-bottom: 1px solid #D2D9E5;
|
|
6
|
+
padding-top: 20px;
|
|
7
|
+
padding-bottom: 20px;
|
|
8
|
+
|
|
9
|
+
.greyBg {
|
|
10
|
+
background: #F5F6F7;
|
|
11
|
+
border-radius: 6px;
|
|
12
|
+
padding: 12px;
|
|
13
|
+
padding-bottom: 1px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
3
16
|
}
|