@fonixtree/magic-design 0.0.96 → 0.0.97

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.
@@ -167,7 +167,7 @@ function (_super) {
167
167
  className: "content-wrap"
168
168
  }, panelProps.label.open && /*#__PURE__*/_react["default"].createElement("div", {
169
169
  className: "promotions-wrap"
170
- }, ['promotion', 'recommend', 'helloworld'].map(function (promot, index) {
170
+ }, promotions.map(function (promot, index) {
171
171
  return /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
172
172
  key: index,
173
173
  className: "promotion-item",
@@ -336,6 +336,8 @@ function (_super) {
336
336
  };
337
337
 
338
338
  _this.getListArr = function (pre, arr, index) {
339
+ console.log('---getListArr', pre, arr);
340
+
339
341
  if (arr) {
340
342
  pre[index] = arr.map(function (item) {
341
343
  return __assign(__assign({}, item), {
@@ -346,6 +348,10 @@ function (_super) {
346
348
  _this.setState({
347
349
  list: pre.slice(0, index + 1)
348
350
  });
351
+ } else if (pre[index]) {
352
+ _this.setState({
353
+ list: pre.slice(0, index)
354
+ });
349
355
  }
350
356
  };
351
357
 
@@ -90,12 +90,13 @@
90
90
 
91
91
  .category-group {
92
92
  display: flex;
93
- overflow-x: scroll;
93
+ overflow-x: auto;
94
94
  flex: 1;
95
95
  scroll-snap-type: x;
96
96
  .one-category {
97
97
  margin-right: 44px;
98
98
  scroll-snap-align: end;
99
+ cursor: pointer;
99
100
  &:last-of-type {
100
101
  margin-right: 0;
101
102
  }
@@ -211,8 +211,8 @@ function metaDecorator(WrappedComponent) {
211
211
  className = _a.className,
212
212
  rest = __rest(_a, ["className"]);
213
213
 
214
- var hoverStyle = this.getInteractStyle();
215
- console.log(rest);
214
+ var hoverStyle = this.getInteractStyle(); // console.log(rest);
215
+
216
216
  return /*#__PURE__*/_react["default"].createElement("div", {
217
217
  className: className,
218
218
  style: this.getStyle()
@@ -4,7 +4,7 @@
4
4
  height: 100%;
5
5
  display: flex;
6
6
  justify-content: center;
7
- overflow: hidden;
7
+ // overflow: hidden;
8
8
  &>img {
9
9
  width: 100%;
10
10
  height: 100%;
@@ -167,7 +167,7 @@ function (_super) {
167
167
  className: "content-wrap"
168
168
  }, panelProps.label.open && /*#__PURE__*/_react["default"].createElement("div", {
169
169
  className: "promotions-wrap"
170
- }, ['promotion', 'recommend', 'helloworld'].map(function (promot, index) {
170
+ }, promotions.map(function (promot, index) {
171
171
  return /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
172
172
  key: index,
173
173
  className: "promotion-item",
@@ -336,6 +336,8 @@ function (_super) {
336
336
  };
337
337
 
338
338
  _this.getListArr = function (pre, arr, index) {
339
+ console.log('---getListArr', pre, arr);
340
+
339
341
  if (arr) {
340
342
  pre[index] = arr.map(function (item) {
341
343
  return __assign(__assign({}, item), {
@@ -346,6 +348,10 @@ function (_super) {
346
348
  _this.setState({
347
349
  list: pre.slice(0, index + 1)
348
350
  });
351
+ } else if (pre[index]) {
352
+ _this.setState({
353
+ list: pre.slice(0, index)
354
+ });
349
355
  }
350
356
  };
351
357
 
@@ -90,12 +90,13 @@
90
90
 
91
91
  .category-group {
92
92
  display: flex;
93
- overflow-x: scroll;
93
+ overflow-x: auto;
94
94
  flex: 1;
95
95
  scroll-snap-type: x;
96
96
  .one-category {
97
97
  margin-right: 44px;
98
98
  scroll-snap-align: end;
99
+ cursor: pointer;
99
100
  &:last-of-type {
100
101
  margin-right: 0;
101
102
  }
@@ -211,8 +211,8 @@ function metaDecorator(WrappedComponent) {
211
211
  className = _a.className,
212
212
  rest = __rest(_a, ["className"]);
213
213
 
214
- var hoverStyle = this.getInteractStyle();
215
- console.log(rest);
214
+ var hoverStyle = this.getInteractStyle(); // console.log(rest);
215
+
216
216
  return /*#__PURE__*/_react["default"].createElement("div", {
217
217
  className: className,
218
218
  style: this.getStyle()
@@ -4,7 +4,7 @@
4
4
  height: 100%;
5
5
  display: flex;
6
6
  justify-content: center;
7
- overflow: hidden;
7
+ // overflow: hidden;
8
8
  &>img {
9
9
  width: 100%;
10
10
  height: 100%;
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.96",
4
+ "version": "0.0.97",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",