cloud-b2b 1.1.40 → 1.1.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.
@@ -134,20 +134,20 @@ var _double = function _double(props) {
134
134
  onChange = props.onChange;
135
135
  var props1 = _objectSpread(_objectSpread({}, props), {}, {
136
136
  defaultValue: props.doubleValue[props.doubleKey[0]],
137
- onChange: props.onChange1
137
+ onChange: props.onChangeKey1
138
138
  });
139
139
  var props2 = _objectSpread(_objectSpread({}, props), {}, {
140
140
  defaultValue: props.doubleValue[props.doubleKey[1]],
141
- onChange: props.onChange2
141
+ onChange: props.onChangeKey2
142
142
  });
143
143
  return /*#__PURE__*/React.createElement("div", {
144
144
  style: {
145
145
  display: 'flex'
146
146
  }
147
147
  }, /*#__PURE__*/React.createElement(NumberInput, _extends({
148
- key: 'linePrice'
148
+ key: doubleKey[0]
149
149
  }, props1)), "~", /*#__PURE__*/React.createElement(NumberInput, _extends({
150
- key: 'linePrice2'
150
+ key: doubleKey[1]
151
151
  }, props2)));
152
152
  };
153
153
 
@@ -366,17 +366,17 @@ var Control = function Control(_ref4) {
366
366
  } : null;
367
367
  var _props$doubleKey = props.doubleKey,
368
368
  doubleKey = _props$doubleKey === void 0 ? undefined : _props$doubleKey,
369
- _props$onChange = props.onChange1,
370
- onChange1 = _props$onChange === void 0 ? undefined : _props$onChange,
371
- _props$onChange2 = props.onChange2,
372
- onChange2 = _props$onChange2 === void 0 ? undefined : _props$onChange2,
369
+ _props$onChangeKey = props.onChangeKey1,
370
+ onChangeKey1 = _props$onChangeKey === void 0 ? undefined : _props$onChangeKey,
371
+ _props$onChangeKey2 = props.onChangeKey2,
372
+ onChangeKey2 = _props$onChangeKey2 === void 0 ? undefined : _props$onChangeKey2,
373
373
  _props$doubleValue = props.doubleValue,
374
374
  doubleValue = _props$doubleValue === void 0 ? {} : _props$doubleValue;
375
375
  return controls[type](_Object$assign(eventWrapper(props), type === 'double' ? {
376
376
  ref: ref,
377
377
  doubleKey: doubleKey,
378
- onChange1: onChange1,
379
- onChange2: onChange2,
378
+ onChangeKey1: onChangeKey1,
379
+ onChangeKey2: onChangeKey2,
380
380
  doubleValue: doubleValue
381
381
  } : {
382
382
  ref: ref
@@ -388,8 +388,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
388
388
  props.defaultValue = props.value;
389
389
  props.doubleKey = props.key;
390
390
  props.doubleValue = helper.getObject(cc, props.key);
391
- props.onChange1 = _bindInstanceProperty(_context20 = _this2.onChange).call(_context20, _assertThisInitialized(_this2), props.key[0]);
392
- props.onChange2 = _bindInstanceProperty(_context21 = _this2.onChange).call(_context21, _assertThisInitialized(_this2), props.key[1]);
391
+ props.onChangeKey1 = _bindInstanceProperty(_context20 = _this2.onChange).call(_context20, _assertThisInitialized(_this2), props.key[0]);
392
+ props.onChangeKey2 = _bindInstanceProperty(_context21 = _this2.onChange).call(_context21, _assertThisInitialized(_this2), props.key[1]);
393
393
  delete props.value;
394
394
  return /*#__PURE__*/React.createElement(Control, props);
395
395
  });
@@ -156,7 +156,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
156
156
  onContentChange && onContentChange(_this.getIndex(rowIndex), key, value);
157
157
  };
158
158
  });
159
- _defineProperty(_assertThisInitialized(_this), "onChange1", function (key, rowIndex) {
159
+ _defineProperty(_assertThisInitialized(_this), "onDoubleChange1", function (key, rowIndex) {
160
160
  return function (doublekey, value) {
161
161
  var _ref4 = _this.props.callback || {},
162
162
  onContentChange = _ref4.onContentChange;
@@ -356,7 +356,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
356
356
  props: readonly ? {} : props,
357
357
  error: _this.validField(required, value),
358
358
  options: _this.getOptions(key, options, index),
359
- onChange: _this.onChange1(key, index),
359
+ onChange: _this.onDoubleChange1(key, index),
360
360
  onSearch: _this.onSearch(key, index, config),
361
361
  onBlur: _this.onBlur(key, index)
362
362
  };
@@ -94,8 +94,8 @@ var SuperTableCell = /*#__PURE__*/function (_React$Component) {
94
94
  props.defaultValue = props.value;
95
95
  props.doubleKey = props.key;
96
96
  props.doubleValue = helper.getObject(cc, props.key);
97
- props.onChange1 = _bindInstanceProperty(_context2 = _this.onChange).call(_context2, _assertThisInitialized(_this), props.key[0]);
98
- props.onChange2 = _bindInstanceProperty(_context3 = _this.onChange).call(_context3, _assertThisInitialized(_this), props.key[1]);
97
+ props.onChangeKey1 = _bindInstanceProperty(_context2 = _this.onChange).call(_context2, _assertThisInitialized(_this), props.key[0]);
98
+ props.onChangeKey2 = _bindInstanceProperty(_context3 = _this.onChange).call(_context3, _assertThisInitialized(_this), props.key[1]);
99
99
  delete props.value;
100
100
  return /*#__PURE__*/React.createElement(Control, props);
101
101
  });
@@ -280,7 +280,7 @@ function SuperUpload(props) {
280
280
  return _fetchImgData.apply(this, arguments);
281
281
  }
282
282
  fetchImgData();
283
- }, [props.fileList]);
283
+ }, [props.fileList.length > 0 ? props.fileList : fileList]);
284
284
  var onPreview = /*#__PURE__*/function () {
285
285
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(file) {
286
286
  return _regeneratorRuntime.wrap(function _callee3$(_context4) {
@@ -141,20 +141,20 @@ var _double = function _double(props) {
141
141
  onChange = props.onChange;
142
142
  var props1 = _objectSpread(_objectSpread({}, props), {}, {
143
143
  defaultValue: props.doubleValue[props.doubleKey[0]],
144
- onChange: props.onChange1
144
+ onChange: props.onChangeKey1
145
145
  });
146
146
  var props2 = _objectSpread(_objectSpread({}, props), {}, {
147
147
  defaultValue: props.doubleValue[props.doubleKey[1]],
148
- onChange: props.onChange2
148
+ onChange: props.onChangeKey2
149
149
  });
150
150
  return /*#__PURE__*/_react["default"].createElement("div", {
151
151
  style: {
152
152
  display: 'flex'
153
153
  }
154
154
  }, /*#__PURE__*/_react["default"].createElement(_NumberInput["default"], (0, _extends2["default"])({
155
- key: 'linePrice'
155
+ key: doubleKey[0]
156
156
  }, props1)), "~", /*#__PURE__*/_react["default"].createElement(_NumberInput["default"], (0, _extends2["default"])({
157
- key: 'linePrice2'
157
+ key: doubleKey[1]
158
158
  }, props2)));
159
159
  };
160
160
 
@@ -373,17 +373,17 @@ var Control = function Control(_ref4) {
373
373
  } : null;
374
374
  var _props$doubleKey = props.doubleKey,
375
375
  doubleKey = _props$doubleKey === void 0 ? undefined : _props$doubleKey,
376
- _props$onChange = props.onChange1,
377
- onChange1 = _props$onChange === void 0 ? undefined : _props$onChange,
378
- _props$onChange2 = props.onChange2,
379
- onChange2 = _props$onChange2 === void 0 ? undefined : _props$onChange2,
376
+ _props$onChangeKey = props.onChangeKey1,
377
+ onChangeKey1 = _props$onChangeKey === void 0 ? undefined : _props$onChangeKey,
378
+ _props$onChangeKey2 = props.onChangeKey2,
379
+ onChangeKey2 = _props$onChangeKey2 === void 0 ? undefined : _props$onChangeKey2,
380
380
  _props$doubleValue = props.doubleValue,
381
381
  doubleValue = _props$doubleValue === void 0 ? {} : _props$doubleValue;
382
382
  return controls[type]((0, _assign["default"])((0, _event["default"])(props), type === 'double' ? {
383
383
  ref: ref,
384
384
  doubleKey: doubleKey,
385
- onChange1: onChange1,
386
- onChange2: onChange2,
385
+ onChangeKey1: onChangeKey1,
386
+ onChangeKey2: onChangeKey2,
387
387
  doubleValue: doubleValue
388
388
  } : {
389
389
  ref: ref
@@ -400,8 +400,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
400
400
  props.defaultValue = props.value;
401
401
  props.doubleKey = props.key;
402
402
  props.doubleValue = _helper["default"].getObject(cc, props.key);
403
- props.onChange1 = (0, _bind["default"])(_context20 = _this2.onChange).call(_context20, (0, _assertThisInitialized2["default"])(_this2), props.key[0]);
404
- props.onChange2 = (0, _bind["default"])(_context21 = _this2.onChange).call(_context21, (0, _assertThisInitialized2["default"])(_this2), props.key[1]);
403
+ props.onChangeKey1 = (0, _bind["default"])(_context20 = _this2.onChange).call(_context20, (0, _assertThisInitialized2["default"])(_this2), props.key[0]);
404
+ props.onChangeKey2 = (0, _bind["default"])(_context21 = _this2.onChange).call(_context21, (0, _assertThisInitialized2["default"])(_this2), props.key[1]);
405
405
  delete props.value;
406
406
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
407
407
  });
@@ -169,7 +169,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
169
169
  onContentChange && onContentChange(_this.getIndex(rowIndex), key, value);
170
170
  };
171
171
  });
172
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange1", function (key, rowIndex) {
172
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDoubleChange1", function (key, rowIndex) {
173
173
  return function (doublekey, value) {
174
174
  var _ref4 = _this.props.callback || {},
175
175
  onContentChange = _ref4.onContentChange;
@@ -369,7 +369,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
369
369
  props: readonly ? {} : props,
370
370
  error: _this.validField(required, value),
371
371
  options: _this.getOptions(key, options, index),
372
- onChange: _this.onChange1(key, index),
372
+ onChange: _this.onDoubleChange1(key, index),
373
373
  onSearch: _this.onSearch(key, index, config),
374
374
  onBlur: _this.onBlur(key, index)
375
375
  };
@@ -100,8 +100,8 @@ var SuperTableCell = /*#__PURE__*/function (_React$Component) {
100
100
  props.defaultValue = props.value;
101
101
  props.doubleKey = props.key;
102
102
  props.doubleValue = _helper["default"].getObject(cc, props.key);
103
- props.onChange1 = (0, _bind["default"])(_context2 = _this.onChange).call(_context2, (0, _assertThisInitialized2["default"])(_this), props.key[0]);
104
- props.onChange2 = (0, _bind["default"])(_context3 = _this.onChange).call(_context3, (0, _assertThisInitialized2["default"])(_this), props.key[1]);
103
+ props.onChangeKey1 = (0, _bind["default"])(_context2 = _this.onChange).call(_context2, (0, _assertThisInitialized2["default"])(_this), props.key[0]);
104
+ props.onChangeKey2 = (0, _bind["default"])(_context3 = _this.onChange).call(_context3, (0, _assertThisInitialized2["default"])(_this), props.key[1]);
105
105
  delete props.value;
106
106
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
107
107
  });
@@ -292,7 +292,7 @@ function SuperUpload(props) {
292
292
  return _fetchImgData.apply(this, arguments);
293
293
  }
294
294
  fetchImgData();
295
- }, [props.fileList]);
295
+ }, [props.fileList.length > 0 ? props.fileList : fileList]);
296
296
  var onPreview = /*#__PURE__*/function () {
297
297
  var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(file) {
298
298
  return _regenerator["default"].wrap(function _callee3$(_context4) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloud-b2b",
3
- "version": "1.1.40",
3
+ "version": "1.1.42",
4
4
  "description": "A react component library dependent antd",
5
5
  "keywords": [
6
6
  "react",