@ucloud-fe/react-components 1.3.1 → 1.3.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/CHANGELOG.md +29 -0
- package/dist/main.min.js +2 -2
- package/lib/components/Cascader/Cascader.d.ts +1 -1
- package/lib/components/Input/Input.js +2 -0
- package/lib/components/Modal/Modal.js +12 -4
- package/lib/components/NumberInput/style/index.js +5 -5
- package/lib/components/Tag/style/index.js +12 -12
- package/package.json +1 -1
|
@@ -133,6 +133,8 @@ var Input = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
133
133
|
var _inputRef$current;
|
|
134
134
|
|
|
135
135
|
(0, _newArrowCheck2.default)(this, _this2);
|
|
136
|
+
// 避免影响输入框的选中、移动光标等操作
|
|
137
|
+
if (e.target === inputRef.current) return;
|
|
136
138
|
e.preventDefault();
|
|
137
139
|
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
138
140
|
}.bind(this), []);
|
|
@@ -110,20 +110,22 @@ var Modal = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
110
110
|
var _this2$props = _this2.props,
|
|
111
111
|
onOk = _this2$props.onOk,
|
|
112
112
|
onClose = _this2$props.onClose,
|
|
113
|
-
locale = _this2$props.locale
|
|
114
|
-
|
|
113
|
+
locale = _this2$props.locale,
|
|
114
|
+
okButtonProps = _this2$props.okButtonProps,
|
|
115
|
+
cancelButtonProps = _this2$props.cancelButtonProps;
|
|
116
|
+
return [/*#__PURE__*/_react.default.createElement(_Button.default, (0, _extends2.default)({
|
|
115
117
|
size: "lg",
|
|
116
118
|
key: "cancel",
|
|
117
119
|
onClick: onClose,
|
|
118
120
|
style: {
|
|
119
121
|
marginRight: 8
|
|
120
122
|
}
|
|
121
|
-
}, locale.cancel), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
123
|
+
}, cancelButtonProps), locale.cancel), /*#__PURE__*/_react.default.createElement(_Button.default, (0, _extends2.default)({
|
|
122
124
|
size: "lg",
|
|
123
125
|
key: "confirm",
|
|
124
126
|
onClick: onOk,
|
|
125
127
|
styleType: "primary"
|
|
126
|
-
}, locale.confirm)];
|
|
128
|
+
}, okButtonProps), locale.confirm)];
|
|
127
129
|
}.bind(this);
|
|
128
130
|
|
|
129
131
|
_this2.savePopupContainer = function (ref) {
|
|
@@ -231,6 +233,12 @@ var Modal = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
231
233
|
/** 点击默认的确认按钮时的回调 */
|
|
232
234
|
onOk: _propTypes.default.func,
|
|
233
235
|
|
|
236
|
+
/** 默认展示的确定按钮的自定义 props */
|
|
237
|
+
okButtonProps: _propTypes.default.object,
|
|
238
|
+
|
|
239
|
+
/** 默认展示的取消按钮的自定义 props */
|
|
240
|
+
cancelButtonProps: _propTypes.default.object,
|
|
241
|
+
|
|
234
242
|
/** 关闭后的回调 */
|
|
235
243
|
afterClose: _propTypes.default.func,
|
|
236
244
|
|