Skip to content
This repository was archived by the owner on Dec 6, 2021. It is now read-only.

Commit 36c9b97

Browse files
committed
fix(input): prop maxlength fails
1 parent a9def4f commit 36c9b97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/input/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
import { ENV_TYPE, getEnv } from "@tarojs/taro"
1414
import { uuid } from "@/utils/common"
1515

16-
type PickAtInputProps = Pick<AtInputProps, 'maxlength' | 'disabled' | 'password'>
16+
type PickAtInputProps = Pick<AtInputProps, 'maxLength' | 'disabled' | 'password'>
1717
type GetInputPropsReturn = PickAtInputProps & Pick<InputProps, 'type'>
1818

1919
function getInputProps(props: AtInputProps): GetInputPropsReturn {
@@ -256,7 +256,7 @@ const AtInput = defineComponent({
256256
placeholderClass: placeholderClasses.value,
257257
placeholder: props.placeholder,
258258
cursorSpacing: props.cursorSpacing,
259-
maxlength: inputProps.value.maxlength,
259+
maxlength: inputProps.value.maxLength,
260260
autoFocus: props.autoFocus,
261261
focus: props.focus,
262262
value: inputValue.value,

0 commit comments

Comments
 (0)