diff --git a/packages/taro-components-rn/src/components/Input/PropsType.tsx b/packages/taro-components-rn/src/components/Input/PropsType.tsx index 1752f3915f82..b9bae094bdb7 100644 --- a/packages/taro-components-rn/src/components/Input/PropsType.tsx +++ b/packages/taro-components-rn/src/components/Input/PropsType.tsx @@ -25,7 +25,7 @@ export interface InputProps { password?: boolean; placeholder?: string; disabled?: boolean; - maxLength: number; + maxlength?: number; autoFocus?: boolean; confirmType: 'done' | 'send' | 'search' | 'next' | 'go'; confirmHold?: boolean; diff --git a/packages/taro-components-rn/src/components/Input/index.tsx b/packages/taro-components-rn/src/components/Input/index.tsx index 1a20ef28f494..0d023db39c05 100644 --- a/packages/taro-components-rn/src/components/Input/index.tsx +++ b/packages/taro-components-rn/src/components/Input/index.tsx @@ -6,7 +6,7 @@ * ✘ placeholder-style: Only placeholderTextColor(RN). * - placeholder-class * ✔ disabled - * ✔ maxLength + * ✔ maxlength * ✘ cursor-spacing * - auto-focus * ✔ focus @@ -58,7 +58,7 @@ const keyboardTypeMap: { [key: string]: string } = { class _Input extends React.Component { static defaultProps = { type: 'text', - maxLength: 140, + maxlength: 140, confirmType: 'done', selectionStart: -1, selectionEnd: -1 @@ -182,7 +182,7 @@ class _Input extends React.Component { password, placeholder, disabled, - maxLength, + maxlength, confirmType, confirmHold, cursor, @@ -214,7 +214,7 @@ class _Input extends React.Component { 'password', 'placeholder', 'disabled', - 'maxLength', + 'maxlength', 'focus', 'confirmType', 'confirmHold', @@ -235,7 +235,7 @@ class _Input extends React.Component { secureTextEntry={!!password} placeholder={placeholder} editable={!disabled} - maxLength={maxLength === -1 ? undefined : maxLength} + maxLength={maxlength === -1 ? undefined : maxlength} // returnKeyLabel={confirmType} returnKeyType={confirmType} blurOnSubmit={!_multiline && !confirmHold} diff --git a/packages/taro-components-rn/src/components/Textarea/PropsType.tsx b/packages/taro-components-rn/src/components/Textarea/PropsType.tsx index 127adec272d2..541d5996406f 100644 --- a/packages/taro-components-rn/src/components/Textarea/PropsType.tsx +++ b/packages/taro-components-rn/src/components/Textarea/PropsType.tsx @@ -3,6 +3,5 @@ import { InputProps, EventOnLineChange } from '../Input/PropsType' export interface TextareaProps extends InputProps { autoHeight?: boolean; autoFocus?: boolean; - maxlength?: number; onLineChange?: (evt: EventOnLineChange) => void; } diff --git a/packages/taro-components-rn/src/components/Textarea/index.tsx b/packages/taro-components-rn/src/components/Textarea/index.tsx index 9a3f66755297..e69f74c86c38 100644 --- a/packages/taro-components-rn/src/components/Textarea/index.tsx +++ b/packages/taro-components-rn/src/components/Textarea/index.tsx @@ -35,7 +35,7 @@ const _Textarea: React.FC = (props: TextareaProps) => { 'onLineChange', 'maxlength' ])} - maxLength={maxlength} + maxlength={maxlength} /> ) }