@fonixtree/magic-design 0.1.38 → 0.1.40

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.
@@ -21,6 +21,8 @@ var _coreUtil = require("../../../../utils/coreUtil");
21
21
 
22
22
  var _common = require("../../../../common");
23
23
 
24
+ var _mobx = require("../../../../mobx");
25
+
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
27
 
26
28
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
@@ -51,6 +53,22 @@ var __extends = void 0 && (void 0).__extends || function () {
51
53
  };
52
54
  }();
53
55
 
56
+ var __assign = void 0 && (void 0).__assign || function () {
57
+ __assign = Object.assign || function (t) {
58
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
59
+ s = arguments[i];
60
+
61
+ for (var p in s) {
62
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
63
+ }
64
+ }
65
+
66
+ return t;
67
+ };
68
+
69
+ return __assign.apply(this, arguments);
70
+ };
71
+
54
72
  var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
55
73
  var c = arguments.length,
56
74
  r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
@@ -74,18 +92,23 @@ function (_super) {
74
92
  };
75
93
 
76
94
  _this.onInit = function (v) {
77
- var _a = _this.props,
78
- component = _a.component,
79
- id = _a.id; // 轮播组件特殊处理
80
- // if (component === 'carousel') {
81
- // if (v === 'layout2') {
82
- // this.setState({ showRowNum: false });
83
- // } else {
84
- // this.setState({ showRowNum: true });
85
- // }
86
- // this.props.store.setState({ CarouselStore: { ...store.CarouselStore, [id]: v } });
87
- // }
88
- // 图文组件,移动端,只有第3个组件可选列数
95
+ var _a;
96
+
97
+ var _b = _this.props,
98
+ component = _b.component,
99
+ id = _b.id; // 轮播组件特殊处理
100
+
101
+ if (component === 'carousel') {
102
+ // if (v === 'layout2') {
103
+ // this.setState({ showRowNum: false });
104
+ // } else {
105
+ // this.setState({ showRowNum: true });
106
+ // }
107
+ _this.props.store.setState({
108
+ CarouselStore: __assign(__assign({}, _mobx.store.CarouselStore), (_a = {}, _a[id] = v, _a))
109
+ });
110
+ } // 图文组件,移动端,只有第3个组件可选列数
111
+
89
112
 
90
113
  if (component === 'imageText') {
91
114
  if (!(0, _coreUtil.isPc)()) {
@@ -227,7 +227,7 @@ function (_super) {
227
227
  _a = _b.sent(), res = _a[0], isFollow = _a[1];
228
228
  this.setState({
229
229
  storeInfo: res,
230
- isFollow: isFollow
230
+ isFollow: isFollow == 'Y'
231
231
  });
232
232
  _b.label = 2;
233
233
 
@@ -229,7 +229,7 @@ function (_super) {
229
229
  _a = _b.sent(), res = _a[0], isFollow = _a[1];
230
230
  this.setState({
231
231
  storeInfo: res,
232
- isFollow: isFollow
232
+ isFollow: isFollow == 'Y'
233
233
  });
234
234
  _b.label = 2;
235
235
 
@@ -21,6 +21,8 @@ var _coreUtil = require("../../../../utils/coreUtil");
21
21
 
22
22
  var _common = require("../../../../common");
23
23
 
24
+ var _mobx = require("../../../../mobx");
25
+
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
27
 
26
28
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
@@ -51,6 +53,22 @@ var __extends = void 0 && (void 0).__extends || function () {
51
53
  };
52
54
  }();
53
55
 
56
+ var __assign = void 0 && (void 0).__assign || function () {
57
+ __assign = Object.assign || function (t) {
58
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
59
+ s = arguments[i];
60
+
61
+ for (var p in s) {
62
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
63
+ }
64
+ }
65
+
66
+ return t;
67
+ };
68
+
69
+ return __assign.apply(this, arguments);
70
+ };
71
+
54
72
  var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
55
73
  var c = arguments.length,
56
74
  r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
@@ -74,18 +92,23 @@ function (_super) {
74
92
  };
75
93
 
76
94
  _this.onInit = function (v) {
77
- var _a = _this.props,
78
- component = _a.component,
79
- id = _a.id; // 轮播组件特殊处理
80
- // if (component === 'carousel') {
81
- // if (v === 'layout2') {
82
- // this.setState({ showRowNum: false });
83
- // } else {
84
- // this.setState({ showRowNum: true });
85
- // }
86
- // this.props.store.setState({ CarouselStore: { ...store.CarouselStore, [id]: v } });
87
- // }
88
- // 图文组件,移动端,只有第3个组件可选列数
95
+ var _a;
96
+
97
+ var _b = _this.props,
98
+ component = _b.component,
99
+ id = _b.id; // 轮播组件特殊处理
100
+
101
+ if (component === 'carousel') {
102
+ // if (v === 'layout2') {
103
+ // this.setState({ showRowNum: false });
104
+ // } else {
105
+ // this.setState({ showRowNum: true });
106
+ // }
107
+ _this.props.store.setState({
108
+ CarouselStore: __assign(__assign({}, _mobx.store.CarouselStore), (_a = {}, _a[id] = v, _a))
109
+ });
110
+ } // 图文组件,移动端,只有第3个组件可选列数
111
+
89
112
 
90
113
  if (component === 'imageText') {
91
114
  if (!(0, _coreUtil.isPc)()) {
@@ -227,7 +227,7 @@ function (_super) {
227
227
  _a = _b.sent(), res = _a[0], isFollow = _a[1];
228
228
  this.setState({
229
229
  storeInfo: res,
230
- isFollow: isFollow
230
+ isFollow: isFollow == 'Y'
231
231
  });
232
232
  _b.label = 2;
233
233
 
@@ -229,7 +229,7 @@ function (_super) {
229
229
  _a = _b.sent(), res = _a[0], isFollow = _a[1];
230
230
  this.setState({
231
231
  storeInfo: res,
232
- isFollow: isFollow
232
+ isFollow: isFollow == 'Y'
233
233
  });
234
234
  _b.label = 2;
235
235
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.1.38",
4
+ "version": "0.1.40",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",