Skip to content

Input 输入框

文本输入组件,支持清除按钮、密码、字数统计。

基础用法

vue
<AInput v-model:value="val" placeholder="请输入" />
<AInput v-model:value="val" clearable />
<AInput v-model:value="val" type="password" />

字数统计

0/50
vue
<AInput :maxlength="50" show-count placeholder="最多 50 字" />

圆角

vue
<AInput round placeholder="圆角输入框" />

API

属性类型默认值说明
valuestring''输入值
placeholderstring占位文本
type'text' | 'password' | 'textarea''text'输入类型
disabledbooleanfalse禁用
clearablebooleanfalse可清除
maxlengthnumber最大字数
showCountbooleanfalse显示字数统计
roundbooleanfalse圆角
size'tiny' | 'small' | 'medium' | 'large'尺寸

Released under the MIT License.