@easyv/react-components 0.3.7 → 0.3.9
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/dist/Input/index.d.ts +3 -2
- package/dist/Input/index.js +0 -7
- package/package.json +1 -1
package/dist/Input/index.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Input } from '@arco-design/web-react';
|
|
3
|
-
import type { InputProps, InputSearchProps, RefInputType } from './interface';
|
|
3
|
+
import type { InputProps, InputSearchProps, RefInputType, RefTextAreaType, TextAreaProps } from './interface';
|
|
4
4
|
import './index.less';
|
|
5
5
|
declare type XInputType = React.ForwardRefExoticComponent<InputProps & React.RefAttributes<RefInputType>> & {
|
|
6
6
|
Search: typeof InputSearch;
|
|
7
|
-
TextArea: typeof
|
|
7
|
+
TextArea: typeof InputTextArea;
|
|
8
8
|
Password: typeof Input.Password;
|
|
9
9
|
Group: typeof Input.Group;
|
|
10
10
|
};
|
|
11
11
|
declare const XInput: XInputType;
|
|
12
12
|
declare const InputSearch: React.ForwardRefExoticComponent<InputSearchProps & React.RefAttributes<RefInputType>>;
|
|
13
|
+
declare const InputTextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<RefTextAreaType>>;
|
|
13
14
|
export default XInput;
|
|
14
15
|
export { InputProps, InputSearchProps, RefInputType };
|
|
15
16
|
export type * from './interface';
|
package/dist/Input/index.js
CHANGED
|
@@ -140,12 +140,6 @@ var InputTextArea = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
140
140
|
}
|
|
141
141
|
}, [value, changeOnBlur]);
|
|
142
142
|
|
|
143
|
-
// 修改组件库的默认行为:按回车失去焦点
|
|
144
|
-
var handlePressEnter = useCallback(function (e) {
|
|
145
|
-
e.currentTarget.blur();
|
|
146
|
-
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(e);
|
|
147
|
-
}, [onPressEnter]);
|
|
148
|
-
|
|
149
143
|
// changeOnBlur 为 true 模式下,修改的值存本地
|
|
150
144
|
var handleChange = useCallback(function (value) {
|
|
151
145
|
setLocalValue(value);
|
|
@@ -165,7 +159,6 @@ var InputTextArea = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
165
159
|
var halfControlledProps = (_halfControlledProps2 = {}, _defineProperty(_halfControlledProps2, 'value' in props ? 'value' : 'defaultValue', localValue), _defineProperty(_halfControlledProps2, "onChange", handleChange), _defineProperty(_halfControlledProps2, "onBlur", handleBlur), _halfControlledProps2);
|
|
166
160
|
return /*#__PURE__*/_jsx(Input.TextArea, _objectSpread(_objectSpread({
|
|
167
161
|
ref: ref,
|
|
168
|
-
onPressEnter: handlePressEnter,
|
|
169
162
|
className: classNames({
|
|
170
163
|
'arco-textarea-borderless': !bordered
|
|
171
164
|
}, className)
|