cloud-b2b 1.1.13 → 1.1.16
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/CodeInput/CodeInput.js +8 -7
- package/es/InputSearch/InputSearch.js +4 -2
- package/es/SuperForm/SuperForm.js +1 -1
- package/es/SuperForm2/SuperForm.js +1 -1
- package/es/SuperTable2/SuperTable2.js +6 -2
- package/lib/CodeInput/CodeInput.js +8 -9
- package/lib/InputSearch/InputSearch.js +4 -2
- package/lib/SuperForm/SuperForm.js +1 -1
- package/lib/SuperForm2/SuperForm.js +1 -1
- package/lib/SuperTable2/SuperTable2.js +6 -2
- package/package.json +1 -1
|
@@ -6,9 +6,7 @@ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/inst
|
|
|
6
6
|
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
7
7
|
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
|
8
8
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
|
9
|
-
import _Row from "antd/es/row";
|
|
10
9
|
import _Button from "antd/es/button";
|
|
11
|
-
import _Col from "antd/es/col";
|
|
12
10
|
import _Input from "antd/es/input";
|
|
13
11
|
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
|
|
14
12
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
@@ -117,10 +115,11 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
|
|
|
117
115
|
});
|
|
118
116
|
|
|
119
117
|
_defineProperty(_assertThisInitialized(_this), "inputProps", function (props) {
|
|
120
|
-
var inpPros = _Object$assign(helper.getObjectExclude(props, ['onGetCode']));
|
|
118
|
+
var inpPros = _Object$assign(helper.getObjectExclude(props, ['onGetCode', 'value']));
|
|
121
119
|
|
|
122
120
|
return _objectSpread(_objectSpread({}, inpPros), {}, {
|
|
123
|
-
size: 'large'
|
|
121
|
+
size: 'large',
|
|
122
|
+
defaultValue: props.value || ''
|
|
124
123
|
});
|
|
125
124
|
});
|
|
126
125
|
|
|
@@ -139,9 +138,11 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
|
|
|
139
138
|
readonly = _this$props.readonly,
|
|
140
139
|
value = _this$props.value;
|
|
141
140
|
var time = this.state.time;
|
|
142
|
-
return /*#__PURE__*/React.createElement(
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
142
|
+
style: {
|
|
143
|
+
display: 'flex'
|
|
144
|
+
}
|
|
145
|
+
}, /*#__PURE__*/React.createElement(_Input, this.inputProps(this.props)), /*#__PURE__*/React.createElement(_Button, this.btnProps(this.props), time === 0 ? "\u83B7\u53D6\u9A8C\u8BC1\u7801" : "".concat(time, "s\u83B7\u53D6\u9A8C\u8BC1\u7801")));
|
|
145
146
|
}
|
|
146
147
|
}]);
|
|
147
148
|
|
|
@@ -186,8 +186,10 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
186
186
|
|
|
187
187
|
_defineProperty(_assertThisInitialized(_this), "isMatchRemark", function (inputValue, option) {
|
|
188
188
|
var _option$props = option.props,
|
|
189
|
-
text = _option$props.text,
|
|
190
|
-
|
|
189
|
+
_option$props$text = _option$props.text,
|
|
190
|
+
text = _option$props$text === void 0 ? '' : _option$props$text,
|
|
191
|
+
_option$props$remark = _option$props.remark,
|
|
192
|
+
remark = _option$props$remark === void 0 ? '' : _option$props$remark;
|
|
191
193
|
return _indexOfInstanceProperty(text).call(text, inputValue) > -1 || _indexOfInstanceProperty(remark).call(remark, inputValue) > -1;
|
|
192
194
|
});
|
|
193
195
|
|
|
@@ -420,7 +420,11 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
420
420
|
minWidth: '100px',
|
|
421
421
|
maxWidth: "".concat(col.width - 16, "px"),
|
|
422
422
|
overflow: 'hidden',
|
|
423
|
-
textOverflow: 'ellipsis'
|
|
423
|
+
textOverflow: 'ellipsis',
|
|
424
|
+
display: '-webkit-box',
|
|
425
|
+
WebkitLineClamp: 2,
|
|
426
|
+
WebkitBoxOrient: "vertical",
|
|
427
|
+
whiteSpace: 'break-spaces'
|
|
424
428
|
},
|
|
425
429
|
title: value
|
|
426
430
|
}, value);
|
|
@@ -471,7 +475,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
471
475
|
});
|
|
472
476
|
|
|
473
477
|
case 'custom':
|
|
474
|
-
return _this.props.callback.onRenderCustom(record.key, col.key, value, col.props);
|
|
478
|
+
return _this.props.callback.onRenderCustom(record.key, col.key, value, col.props, col);
|
|
475
479
|
|
|
476
480
|
case 'toolbar':
|
|
477
481
|
//showByKey为true时,每条数据中与按钮key相同的属性值决定按钮是否显示,建议key用下划线开始命名,避免与后台数据冲突
|
|
@@ -28,12 +28,8 @@ exports["default"] = void 0;
|
|
|
28
28
|
|
|
29
29
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator"));
|
|
30
30
|
|
|
31
|
-
var _row = _interopRequireDefault(require("antd/lib/row"));
|
|
32
|
-
|
|
33
31
|
var _button = _interopRequireDefault(require("antd/lib/button"));
|
|
34
32
|
|
|
35
|
-
var _col = _interopRequireDefault(require("antd/lib/col"));
|
|
36
|
-
|
|
37
33
|
var _input = _interopRequireDefault(require("antd/lib/input"));
|
|
38
34
|
|
|
39
35
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
|
|
@@ -148,9 +144,10 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
|
|
|
148
144
|
});
|
|
149
145
|
});
|
|
150
146
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "inputProps", function (props) {
|
|
151
|
-
var inpPros = (0, _assign["default"])(_helper["default"].getObjectExclude(props, ['onGetCode']));
|
|
147
|
+
var inpPros = (0, _assign["default"])(_helper["default"].getObjectExclude(props, ['onGetCode', 'value']));
|
|
152
148
|
return _objectSpread(_objectSpread({}, inpPros), {}, {
|
|
153
|
-
size: 'large'
|
|
149
|
+
size: 'large',
|
|
150
|
+
defaultValue: props.value || ''
|
|
154
151
|
});
|
|
155
152
|
});
|
|
156
153
|
_this.state = {
|
|
@@ -168,9 +165,11 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
|
|
|
168
165
|
readonly = _this$props.readonly,
|
|
169
166
|
value = _this$props.value;
|
|
170
167
|
var time = this.state.time;
|
|
171
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
172
|
-
|
|
173
|
-
|
|
168
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
169
|
+
style: {
|
|
170
|
+
display: 'flex'
|
|
171
|
+
}
|
|
172
|
+
}, /*#__PURE__*/_react["default"].createElement(_input["default"], this.inputProps(this.props)), /*#__PURE__*/_react["default"].createElement(_button["default"], this.btnProps(this.props), time === 0 ? "\u83B7\u53D6\u9A8C\u8BC1\u7801" : "".concat(time, "s\u83B7\u53D6\u9A8C\u8BC1\u7801")));
|
|
174
173
|
}
|
|
175
174
|
}]);
|
|
176
175
|
return CodeInput;
|
|
@@ -209,8 +209,10 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
|
|
|
209
209
|
});
|
|
210
210
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "isMatchRemark", function (inputValue, option) {
|
|
211
211
|
var _option$props = option.props,
|
|
212
|
-
text = _option$props.text,
|
|
213
|
-
|
|
212
|
+
_option$props$text = _option$props.text,
|
|
213
|
+
text = _option$props$text === void 0 ? '' : _option$props$text,
|
|
214
|
+
_option$props$remark = _option$props.remark,
|
|
215
|
+
remark = _option$props$remark === void 0 ? '' : _option$props$remark;
|
|
214
216
|
return (0, _indexOf["default"])(text).call(text, inputValue) > -1 || (0, _indexOf["default"])(remark).call(remark, inputValue) > -1;
|
|
215
217
|
});
|
|
216
218
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "isValidValue", function (value) {
|
|
@@ -469,7 +469,11 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
469
469
|
minWidth: '100px',
|
|
470
470
|
maxWidth: "".concat(col.width - 16, "px"),
|
|
471
471
|
overflow: 'hidden',
|
|
472
|
-
textOverflow: 'ellipsis'
|
|
472
|
+
textOverflow: 'ellipsis',
|
|
473
|
+
display: '-webkit-box',
|
|
474
|
+
WebkitLineClamp: 2,
|
|
475
|
+
WebkitBoxOrient: "vertical",
|
|
476
|
+
whiteSpace: 'break-spaces'
|
|
473
477
|
},
|
|
474
478
|
title: value
|
|
475
479
|
}, value);
|
|
@@ -520,7 +524,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
520
524
|
});
|
|
521
525
|
|
|
522
526
|
case 'custom':
|
|
523
|
-
return _this.props.callback.onRenderCustom(record.key, col.key, value, col.props);
|
|
527
|
+
return _this.props.callback.onRenderCustom(record.key, col.key, value, col.props, col);
|
|
524
528
|
|
|
525
529
|
case 'toolbar':
|
|
526
530
|
//showByKey为true时,每条数据中与按钮key相同的属性值决定按钮是否显示,建议key用下划线开始命名,避免与后台数据冲突
|