@fonixtree/magic-design 1.0.180 → 1.0.182

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.
@@ -112,7 +112,10 @@ function (_super) {
112
112
 
113
113
  _this.copyItem = function (e, item) {
114
114
  e.stopPropagation();
115
- var source = _this.props.source;
115
+ var _a = _this.props,
116
+ source = _a.source,
117
+ max = _a.max;
118
+ if (source.length >= max) return;
116
119
  var index = source.findIndex(function (src) {
117
120
  return src.id === item.id;
118
121
  });
@@ -207,7 +210,8 @@ function (_super) {
207
210
  source: [],
208
211
  onClickItem: function onClickItem() {},
209
212
  reRender: function reRender() {},
210
- renderCard: renderCardDefault
213
+ renderCard: renderCardDefault,
214
+ max: 99
211
215
  };
212
216
  return GroupList;
213
217
  }(_react["default"].Component);
@@ -101,8 +101,11 @@ function (_super) {
101
101
  }
102
102
 
103
103
  AComponent.prototype.render = function () {
104
- var _a = this.props.source,
105
- source = _a === void 0 ? [] : _a;
104
+ var _a = this.props,
105
+ _b = _a.source,
106
+ source = _b === void 0 ? [] : _b,
107
+ customize = _a.customize;
108
+ var limit = (customize.layout.h5Layout === 'layout3' || customize.layout.h5Layout === 'layout4') && source.length >= 3;
106
109
 
107
110
  var _renderCard = function renderCard(src) {
108
111
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -122,6 +125,7 @@ function (_super) {
122
125
  }, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
123
126
  className: "notice"
124
127
  }, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
128
+ max: customize.layout.h5Layout === 'layout3' || customize.layout.h5Layout === 'layout4' ? 3 : 99,
125
129
  onClickItem: this.onClickItem,
126
130
  renderCard: function renderCard(v) {
127
131
  return _renderCard(v);
@@ -131,7 +135,7 @@ function (_super) {
131
135
  })), /*#__PURE__*/_react["default"].createElement("div", {
132
136
  className: "btn_wrap"
133
137
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
134
- disabled: source.length >= 3,
138
+ disabled: limit,
135
139
  icon: "icon-add",
136
140
  onClick: this.onAddClick,
137
141
  type: "primary"
@@ -43,6 +43,7 @@ function ImageGalleryConfig(props) {
43
43
  key: '1',
44
44
  name: (0, _locale.i18n)('IMAGES'),
45
45
  value: /*#__PURE__*/_react["default"].createElement(_ImageGalleryConfigImageGroup["default"], {
46
+ customize: data.customize,
46
47
  source: data.groupSource
47
48
  })
48
49
  }, {
@@ -95,10 +95,16 @@
95
95
  color: #3E3E3E;
96
96
  font-family: Montserrat;
97
97
  }
98
+ .personal-information-second-mobile .top .btnGroup {
99
+ display: flex;
100
+ align-items: center;
101
+ }
98
102
  .personal-information-second-mobile .top .btnGroup .iconWrap {
99
103
  display: inline-block;
100
104
  margin-left: 0.3rem;
101
105
  position: relative;
106
+ display: inline-flex;
107
+ align-items: center;
102
108
  }
103
109
  .personal-information-second-mobile .top .btnGroup .num {
104
110
  position: absolute;
@@ -32,12 +32,14 @@
32
32
  video {
33
33
  width: 100%;
34
34
  border-radius: 16px;
35
+ vertical-align: middle;
35
36
  }
36
37
 
37
38
  .video-img {
38
39
  width: 100%;
39
40
  border-radius: 16px;
40
41
  background: #fff;
42
+ vertical-align: middle;
41
43
 
42
44
  &.cover {
43
45
  position: absolute;
@@ -112,7 +112,10 @@ function (_super) {
112
112
 
113
113
  _this.copyItem = function (e, item) {
114
114
  e.stopPropagation();
115
- var source = _this.props.source;
115
+ var _a = _this.props,
116
+ source = _a.source,
117
+ max = _a.max;
118
+ if (source.length >= max) return;
116
119
  var index = source.findIndex(function (src) {
117
120
  return src.id === item.id;
118
121
  });
@@ -207,7 +210,8 @@ function (_super) {
207
210
  source: [],
208
211
  onClickItem: function onClickItem() {},
209
212
  reRender: function reRender() {},
210
- renderCard: renderCardDefault
213
+ renderCard: renderCardDefault,
214
+ max: 99
211
215
  };
212
216
  return GroupList;
213
217
  }(_react["default"].Component);
@@ -101,8 +101,11 @@ function (_super) {
101
101
  }
102
102
 
103
103
  AComponent.prototype.render = function () {
104
- var _a = this.props.source,
105
- source = _a === void 0 ? [] : _a;
104
+ var _a = this.props,
105
+ _b = _a.source,
106
+ source = _b === void 0 ? [] : _b,
107
+ customize = _a.customize;
108
+ var limit = (customize.layout.h5Layout === 'layout3' || customize.layout.h5Layout === 'layout4') && source.length >= 3;
106
109
 
107
110
  var _renderCard = function renderCard(src) {
108
111
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -122,6 +125,7 @@ function (_super) {
122
125
  }, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
123
126
  className: "notice"
124
127
  }, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
128
+ max: customize.layout.h5Layout === 'layout3' || customize.layout.h5Layout === 'layout4' ? 3 : 99,
125
129
  onClickItem: this.onClickItem,
126
130
  renderCard: function renderCard(v) {
127
131
  return _renderCard(v);
@@ -131,7 +135,7 @@ function (_super) {
131
135
  })), /*#__PURE__*/_react["default"].createElement("div", {
132
136
  className: "btn_wrap"
133
137
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
134
- disabled: source.length >= 3,
138
+ disabled: limit,
135
139
  icon: "icon-add",
136
140
  onClick: this.onAddClick,
137
141
  type: "primary"
@@ -43,6 +43,7 @@ function ImageGalleryConfig(props) {
43
43
  key: '1',
44
44
  name: (0, _locale.i18n)('IMAGES'),
45
45
  value: /*#__PURE__*/_react["default"].createElement(_ImageGalleryConfigImageGroup["default"], {
46
+ customize: data.customize,
46
47
  source: data.groupSource
47
48
  })
48
49
  }, {
@@ -95,10 +95,16 @@
95
95
  color: #3E3E3E;
96
96
  font-family: Montserrat;
97
97
  }
98
+ .personal-information-second-mobile .top .btnGroup {
99
+ display: flex;
100
+ align-items: center;
101
+ }
98
102
  .personal-information-second-mobile .top .btnGroup .iconWrap {
99
103
  display: inline-block;
100
104
  margin-left: 0.3rem;
101
105
  position: relative;
106
+ display: inline-flex;
107
+ align-items: center;
102
108
  }
103
109
  .personal-information-second-mobile .top .btnGroup .num {
104
110
  position: absolute;
@@ -32,12 +32,14 @@
32
32
  video {
33
33
  width: 100%;
34
34
  border-radius: 16px;
35
+ vertical-align: middle;
35
36
  }
36
37
 
37
38
  .video-img {
38
39
  width: 100%;
39
40
  border-radius: 16px;
40
41
  background: #fff;
42
+ vertical-align: middle;
41
43
 
42
44
  &.cover {
43
45
  position: absolute;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "1.0.180",
4
+ "version": "1.0.182",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",