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

Commit

Permalink
fix(input): prop maxlength fails
Browse files Browse the repository at this point in the history
  • Loading branch information
b2nil committed Nov 14, 2020
1 parent a9def4f commit 36c9b97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/input/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { ENV_TYPE, getEnv } from "@tarojs/taro"
import { uuid } from "@/utils/common"

type PickAtInputProps = Pick<AtInputProps, 'maxlength' | 'disabled' | 'password'>
type PickAtInputProps = Pick<AtInputProps, 'maxLength' | 'disabled' | 'password'>
type GetInputPropsReturn = PickAtInputProps & Pick<InputProps, 'type'>

function getInputProps(props: AtInputProps): GetInputPropsReturn {
Expand Down Expand Up @@ -256,7 +256,7 @@ const AtInput = defineComponent({
placeholderClass: placeholderClasses.value,
placeholder: props.placeholder,
cursorSpacing: props.cursorSpacing,
maxlength: inputProps.value.maxlength,
maxlength: inputProps.value.maxLength,
autoFocus: props.autoFocus,
focus: props.focus,
value: inputValue.value,
Expand Down

0 comments on commit 36c9b97

Please sign in to comment.