cloud-b2b 1.1.4 → 1.1.5

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/Area/Area.js CHANGED
@@ -58,7 +58,8 @@ var Area = /*#__PURE__*/function (_React$Component) {
58
58
  var _this$props = _this.props,
59
59
  onParentChange = _this$props.onParentChange,
60
60
  child = _this$props.child,
61
- value = _this$props.value;
61
+ _this$props$value = _this$props.value,
62
+ value = _this$props$value === void 0 ? {} : _this$props$value;
62
63
  var newValue = {};
63
64
  newValue[key] = keyValue;
64
65
  var CheckValue, checkIndex;
@@ -83,7 +84,8 @@ var Area = /*#__PURE__*/function (_React$Component) {
83
84
  var _this$props2 = _this.props,
84
85
  onAreaSearch = _this$props2.onAreaSearch,
85
86
  child = _this$props2.child,
86
- value = _this$props2.value;
87
+ _this$props2$value = _this$props2.value,
88
+ value = _this$props2$value === void 0 ? {} : _this$props2$value;
87
89
  var flag = true;
88
90
 
89
91
  _mapInstanceProperty(child).call(child, function (item, index) {
@@ -113,7 +115,7 @@ var Area = /*#__PURE__*/function (_React$Component) {
113
115
  value: function componentWillReceiveProps(props) {
114
116
  if (props.value !== this.props.value) {
115
117
  this.setState({
116
- value: props.value
118
+ value: props.value || {}
117
119
  });
118
120
  }
119
121
  }
@@ -129,7 +131,8 @@ var Area = /*#__PURE__*/function (_React$Component) {
129
131
  options = _this$props3$options === void 0 ? {} : _this$props3$options,
130
132
  _this$props3$readonly = _this$props3.readonly,
131
133
  readonly = _this$props3$readonly === void 0 ? false : _this$props3$readonly,
132
- value = _this$props3.value;
134
+ _this$props3$value = _this$props3.value,
135
+ value = _this$props3$value === void 0 ? {} : _this$props3$value;
133
136
  return /*#__PURE__*/React.createElement(_Row, null, _mapInstanceProperty(child).call(child, function (item, index) {
134
137
  var _context, _context2, _context3;
135
138
 
@@ -148,7 +151,7 @@ var Area = /*#__PURE__*/function (_React$Component) {
148
151
  onSearch: _bindInstanceProperty(_context2 = _this2.onSearch).call(_context2, _this2, item.key, item, parentKey),
149
152
  onChange: _bindInstanceProperty(_context3 = _this2.onChange).call(_context3, _this2, item.key),
150
153
  options: childOptions,
151
- value: _this2.props.value[item.key].title ? _this2.props.value[item.key].title : _this2.props.value[item.key],
154
+ value: value[item.key].title ? value[item.key].title : value[item.key],
152
155
  type: readonly ? 'readonly' : item.type
153
156
  });
154
157
 
@@ -439,14 +439,16 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
439
439
  return value ? typeof value === 'string' ? /*#__PURE__*/React.createElement("img", {
440
440
  src: value,
441
441
  style: {
442
- maxWidth: '100px'
442
+ width: '80px',
443
+ height: '80px'
443
444
  }
444
445
  }) : /*#__PURE__*/React.createElement("div", {
445
446
  role: 'imgBox'
446
447
  }, /*#__PURE__*/React.createElement("img", {
447
448
  src: value.img,
448
449
  style: {
449
- maxWidth: '100px'
450
+ width: '80px',
451
+ height: '80px'
450
452
  }
451
453
  }), /*#__PURE__*/React.createElement("span", null, value.title)) : /*#__PURE__*/React.createElement("div", null);
452
454
 
@@ -1,35 +1,35 @@
1
- @import '../variables';
2
-
3
- .@{cloudlink-prefix}-title {
4
- > *:first-child {
5
- display: inline-block;
6
- color: @brand-primary;
7
- line-height: 1.2;
8
-
9
- &[data-border='true'] {
10
- padding: 0 5px;
11
- border-left: @brand-primary solid 3px;
12
- }
13
-
14
- &[data-fold='true'] {
15
- cursor: pointer;
16
- margin: 8px 0;
17
- }
18
-
19
- &[data-required='true'] {
20
- &::after {
21
- display: inline-block;
22
- margin-left: 4px;
23
- color: #f5222d;
24
- font-size: 12px;
25
- font-family: SimSun, sans-serif;
26
- line-height: 1;
27
- content: '*';
28
- }
29
- }
30
- }
31
-
32
- > [role = 'toolbar'] {
33
- display: inline-block;
34
- }
35
- }
1
+ @import '../variables';
2
+
3
+ .@{cloudlink-prefix}-title {
4
+ > *:first-child {
5
+ display: inline-block;
6
+ color: @brand-primary;
7
+ line-height: 1.2;
8
+
9
+ &[data-border='true'] {
10
+ padding: 0 5px;
11
+ border-left: @brand-primary solid 3px;
12
+ }
13
+
14
+ &[data-fold='true'] {
15
+ cursor: pointer;
16
+ margin: 8px 0;
17
+ }
18
+
19
+ &[data-required='true'] {
20
+ &::after {
21
+ display: inline-block;
22
+ margin-left: 4px;
23
+ color: #f5222d;
24
+ font-size: 12px;
25
+ font-family: SimSun, sans-serif;
26
+ line-height: 1;
27
+ content: '*';
28
+ }
29
+ }
30
+ }
31
+
32
+ > [role = 'toolbar'] {
33
+ display: inline-block;
34
+ }
35
+ }
@@ -1,6 +1,6 @@
1
- {
2
- "name": "Title",
3
- "version": "0.0.0",
4
- "private": true,
5
- "main": "./Title.js"
6
- }
1
+ {
2
+ "name": "Title",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "main": "./Title.js"
6
+ }
package/lib/Area/Area.js CHANGED
@@ -91,7 +91,8 @@ var Area = /*#__PURE__*/function (_React$Component) {
91
91
  var _this$props = _this.props,
92
92
  onParentChange = _this$props.onParentChange,
93
93
  child = _this$props.child,
94
- value = _this$props.value;
94
+ _this$props$value = _this$props.value,
95
+ value = _this$props$value === void 0 ? {} : _this$props$value;
95
96
  var newValue = {};
96
97
  newValue[key] = keyValue;
97
98
  var CheckValue, checkIndex;
@@ -114,7 +115,8 @@ var Area = /*#__PURE__*/function (_React$Component) {
114
115
  var _this$props2 = _this.props,
115
116
  onAreaSearch = _this$props2.onAreaSearch,
116
117
  child = _this$props2.child,
117
- value = _this$props2.value;
118
+ _this$props2$value = _this$props2.value,
119
+ value = _this$props2$value === void 0 ? {} : _this$props2$value;
118
120
  var flag = true;
119
121
  (0, _map["default"])(child).call(child, function (item, index) {
120
122
  if (item.key === key && index !== 0) {
@@ -141,7 +143,7 @@ var Area = /*#__PURE__*/function (_React$Component) {
141
143
  value: function componentWillReceiveProps(props) {
142
144
  if (props.value !== this.props.value) {
143
145
  this.setState({
144
- value: props.value
146
+ value: props.value || {}
145
147
  });
146
148
  }
147
149
  }
@@ -157,7 +159,8 @@ var Area = /*#__PURE__*/function (_React$Component) {
157
159
  options = _this$props3$options === void 0 ? {} : _this$props3$options,
158
160
  _this$props3$readonly = _this$props3.readonly,
159
161
  readonly = _this$props3$readonly === void 0 ? false : _this$props3$readonly,
160
- value = _this$props3.value;
162
+ _this$props3$value = _this$props3.value,
163
+ value = _this$props3$value === void 0 ? {} : _this$props3$value;
161
164
  return /*#__PURE__*/_react["default"].createElement(_row["default"], null, (0, _map["default"])(child).call(child, function (item, index) {
162
165
  var _context, _context2, _context3;
163
166
 
@@ -176,7 +179,7 @@ var Area = /*#__PURE__*/function (_React$Component) {
176
179
  onSearch: (0, _bind["default"])(_context2 = _this2.onSearch).call(_context2, _this2, item.key, item, parentKey),
177
180
  onChange: (0, _bind["default"])(_context3 = _this2.onChange).call(_context3, _this2, item.key),
178
181
  options: childOptions,
179
- value: _this2.props.value[item.key].title ? _this2.props.value[item.key].title : _this2.props.value[item.key],
182
+ value: value[item.key].title ? value[item.key].title : value[item.key],
180
183
  type: readonly ? 'readonly' : item.type
181
184
  });
182
185
 
@@ -478,14 +478,16 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
478
478
  return value ? typeof value === 'string' ? /*#__PURE__*/_react["default"].createElement("img", {
479
479
  src: value,
480
480
  style: {
481
- maxWidth: '100px'
481
+ width: '80px',
482
+ height: '80px'
482
483
  }
483
484
  }) : /*#__PURE__*/_react["default"].createElement("div", {
484
485
  role: 'imgBox'
485
486
  }, /*#__PURE__*/_react["default"].createElement("img", {
486
487
  src: value.img,
487
488
  style: {
488
- maxWidth: '100px'
489
+ width: '80px',
490
+ height: '80px'
489
491
  }
490
492
  }), /*#__PURE__*/_react["default"].createElement("span", null, value.title)) : /*#__PURE__*/_react["default"].createElement("div", null);
491
493
 
@@ -1,35 +1,35 @@
1
- @import '../variables';
2
-
3
- .@{cloudlink-prefix}-title {
4
- > *:first-child {
5
- display: inline-block;
6
- color: @brand-primary;
7
- line-height: 1.2;
8
-
9
- &[data-border='true'] {
10
- padding: 0 5px;
11
- border-left: @brand-primary solid 3px;
12
- }
13
-
14
- &[data-fold='true'] {
15
- cursor: pointer;
16
- margin: 8px 0;
17
- }
18
-
19
- &[data-required='true'] {
20
- &::after {
21
- display: inline-block;
22
- margin-left: 4px;
23
- color: #f5222d;
24
- font-size: 12px;
25
- font-family: SimSun, sans-serif;
26
- line-height: 1;
27
- content: '*';
28
- }
29
- }
30
- }
31
-
32
- > [role = 'toolbar'] {
33
- display: inline-block;
34
- }
35
- }
1
+ @import '../variables';
2
+
3
+ .@{cloudlink-prefix}-title {
4
+ > *:first-child {
5
+ display: inline-block;
6
+ color: @brand-primary;
7
+ line-height: 1.2;
8
+
9
+ &[data-border='true'] {
10
+ padding: 0 5px;
11
+ border-left: @brand-primary solid 3px;
12
+ }
13
+
14
+ &[data-fold='true'] {
15
+ cursor: pointer;
16
+ margin: 8px 0;
17
+ }
18
+
19
+ &[data-required='true'] {
20
+ &::after {
21
+ display: inline-block;
22
+ margin-left: 4px;
23
+ color: #f5222d;
24
+ font-size: 12px;
25
+ font-family: SimSun, sans-serif;
26
+ line-height: 1;
27
+ content: '*';
28
+ }
29
+ }
30
+ }
31
+
32
+ > [role = 'toolbar'] {
33
+ display: inline-block;
34
+ }
35
+ }
@@ -1,6 +1,6 @@
1
- {
2
- "name": "Title",
3
- "version": "0.0.0",
4
- "private": true,
5
- "main": "./Title.js"
6
- }
1
+ {
2
+ "name": "Title",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "main": "./Title.js"
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloud-b2b",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "A react component library dependent antd",
5
5
  "keywords": [
6
6
  "react",