Skip to content

Input 输入框

规则

js
{
    type:"input",
    title:"商品名称",
    field:"goods_name",
    value:"iphone 7",
    props: {
        type: "password",
    }
}
{
    type:"input",
    title:"商品名称",
    field:"goods_name",
    value:"iphone 7",
    props: {
        type: "password",
    }
}

参考:arco-design_Input

value :String

Props

参数名描述类型默认值版本
size输入框大小'mini' | 'small' | 'medium' | 'large''medium'
allow-clear是否允许清空输入框booleanfalse
disabled是否禁用booleanfalse
readonly是否为只读状态booleanfalse
error是否为错误状态booleanfalse
placeholder提示文字string-
max-length输入值得最大长度,errorOnly 属性在 2.12.0 版本添加number | { length: number; errorOnly?: boolean }0
show-word-limit是否显示字数统计booleanfalse
word-length字符长度的计算方法(value: string) => number-
word-slice字符截取方法,同 wordLength 一起使用(value: string, maxLength: number) => string-2.12.0

Events

事件名描述参数
input用户输入时触发value: string
change仅在输入框失焦或按下回车时触发value: string
press-enter用户按下回车时触发-
clear用户点击清除按钮时触发-
focus输入框获取焦点时触发-
blur输入框失去焦点时触发-

<input-password> Props

参数名描述类型默认值
invisible-button是否显示可见按钮booleantrue

<input-search> Props

参数名描述类型默认值版本
search-button是否为后置按钮模式booleanfalse
loading是否为加载中状态booleanfalse
disabled是否禁用booleanfalse
size输入框大小'mini' | 'small' | 'medium' | 'large''medium'
button-text搜索按钮的文字,使用后会替换原本的图标string-2.16.0
button-props搜索按钮的属性object-

<input-search> Events

事件名描述参数
search单击搜索按钮时触发value: string

Released under the MIT License.