@fonixtree/magic-design 0.0.40 → 0.0.42
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/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/es/composite-comp/common/components/ImageLabel/index.less +3 -3
- package/es/composite-comp/common/components/ProductItem/index.less +5 -2
- package/es/meta-comp/components/Image/index.js +3 -6
- package/lib/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/lib/composite-comp/common/components/ImageLabel/index.less +3 -3
- package/lib/composite-comp/common/components/ProductItem/index.less +5 -2
- package/lib/meta-comp/components/Image/index.js +3 -6
- package/package.json +1 -1
|
@@ -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 || 'default')] = 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 || 'default')] = true, _b))
|
|
82
82
|
}, label.labelName);
|
|
83
83
|
});
|
|
84
84
|
};
|
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
background: #FFFFFF;
|
|
5
5
|
border: 1px solid #D2D9E5;
|
|
6
6
|
width: 142px;
|
|
7
|
+
border-radius: 8px;
|
|
7
8
|
|
|
8
9
|
.img-wrap {
|
|
9
10
|
position: relative;
|
|
11
|
+
border-radius: 8px;
|
|
10
12
|
|
|
11
13
|
.product-img {
|
|
14
|
+
border-radius: 8px;
|
|
12
15
|
width: 140px;
|
|
13
16
|
height: 140px;
|
|
14
17
|
object-fit: cover;
|
|
@@ -33,7 +36,7 @@
|
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
.product-name {
|
|
36
|
-
margin-bottom:
|
|
39
|
+
margin-bottom: 5px;
|
|
37
40
|
// font-family: 'Montserrat';
|
|
38
41
|
// font-style: normal;
|
|
39
42
|
// font-weight: 500;
|
|
@@ -57,7 +60,7 @@
|
|
|
57
60
|
|
|
58
61
|
.old-price-wrap {
|
|
59
62
|
display: flex;
|
|
60
|
-
margin-top:
|
|
63
|
+
margin-top: 3px;
|
|
61
64
|
align-items: baseline;
|
|
62
65
|
white-space: nowrap;
|
|
63
66
|
overflow: hidden;
|
|
@@ -11,8 +11,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
-
var _defaultImg = _interopRequireDefault(require("./image/default-img.png"));
|
|
15
|
-
|
|
16
14
|
var _coreUtil = require("../../../utils/coreUtil");
|
|
17
15
|
|
|
18
16
|
var _decorator = require("../../../decorator");
|
|
@@ -163,11 +161,10 @@ function (_super) {
|
|
|
163
161
|
|
|
164
162
|
if (window.magicDesign.isShop && (srcImg === null || srcImg === void 0 ? void 0 : srcImg.includes('ecommerce/static'))) {
|
|
165
163
|
srcImg = srcImg.replace('ecommerce/static', 'static');
|
|
166
|
-
}
|
|
164
|
+
} // if (!srcImg) {
|
|
165
|
+
// srcImg = defaultImg;
|
|
166
|
+
// }
|
|
167
167
|
|
|
168
|
-
if (!srcImg) {
|
|
169
|
-
srcImg = _defaultImg["default"];
|
|
170
|
-
}
|
|
171
168
|
|
|
172
169
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
170
|
className: (0, _classnames["default"])('m-meta-image', {
|
|
@@ -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 || 'default')] = 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 || 'default')] = true, _b))
|
|
82
82
|
}, label.labelName);
|
|
83
83
|
});
|
|
84
84
|
};
|
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
background: #FFFFFF;
|
|
5
5
|
border: 1px solid #D2D9E5;
|
|
6
6
|
width: 142px;
|
|
7
|
+
border-radius: 8px;
|
|
7
8
|
|
|
8
9
|
.img-wrap {
|
|
9
10
|
position: relative;
|
|
11
|
+
border-radius: 8px;
|
|
10
12
|
|
|
11
13
|
.product-img {
|
|
14
|
+
border-radius: 8px;
|
|
12
15
|
width: 140px;
|
|
13
16
|
height: 140px;
|
|
14
17
|
object-fit: cover;
|
|
@@ -33,7 +36,7 @@
|
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
.product-name {
|
|
36
|
-
margin-bottom:
|
|
39
|
+
margin-bottom: 5px;
|
|
37
40
|
// font-family: 'Montserrat';
|
|
38
41
|
// font-style: normal;
|
|
39
42
|
// font-weight: 500;
|
|
@@ -57,7 +60,7 @@
|
|
|
57
60
|
|
|
58
61
|
.old-price-wrap {
|
|
59
62
|
display: flex;
|
|
60
|
-
margin-top:
|
|
63
|
+
margin-top: 3px;
|
|
61
64
|
align-items: baseline;
|
|
62
65
|
white-space: nowrap;
|
|
63
66
|
overflow: hidden;
|
|
@@ -11,8 +11,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
-
var _defaultImg = _interopRequireDefault(require("./image/default-img.png"));
|
|
15
|
-
|
|
16
14
|
var _coreUtil = require("../../../utils/coreUtil");
|
|
17
15
|
|
|
18
16
|
var _decorator = require("../../../decorator");
|
|
@@ -163,11 +161,10 @@ function (_super) {
|
|
|
163
161
|
|
|
164
162
|
if (window.magicDesign.isShop && (srcImg === null || srcImg === void 0 ? void 0 : srcImg.includes('ecommerce/static'))) {
|
|
165
163
|
srcImg = srcImg.replace('ecommerce/static', 'static');
|
|
166
|
-
}
|
|
164
|
+
} // if (!srcImg) {
|
|
165
|
+
// srcImg = defaultImg;
|
|
166
|
+
// }
|
|
167
167
|
|
|
168
|
-
if (!srcImg) {
|
|
169
|
-
srcImg = _defaultImg["default"];
|
|
170
|
-
}
|
|
171
168
|
|
|
172
169
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
170
|
className: (0, _classnames["default"])('m-meta-image', {
|