@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.
@@ -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
  };
@@ -1,4 +1,3 @@
1
-
2
1
  .image-label-wrap {
3
2
  position: absolute;
4
3
  z-index: 1;
@@ -13,7 +12,8 @@
13
12
  }
14
13
  }
15
14
 
16
- &.position-1 {
15
+ &.position-1,
16
+ &.position-default {
17
17
  top: 0;
18
18
  left: 0;
19
19
  }
@@ -32,4 +32,4 @@
32
32
  bottom: 0;
33
33
  right: 0;
34
34
  }
35
- }
35
+ }
@@ -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: 3px;
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: 0px;
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
  };
@@ -1,4 +1,3 @@
1
-
2
1
  .image-label-wrap {
3
2
  position: absolute;
4
3
  z-index: 1;
@@ -13,7 +12,8 @@
13
12
  }
14
13
  }
15
14
 
16
- &.position-1 {
15
+ &.position-1,
16
+ &.position-default {
17
17
  top: 0;
18
18
  left: 0;
19
19
  }
@@ -32,4 +32,4 @@
32
32
  bottom: 0;
33
33
  right: 0;
34
34
  }
35
- }
35
+ }
@@ -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: 3px;
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: 0px;
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', {
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.40",
4
+ "version": "0.0.42",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",