0.2.3 • Published 8 years ago

tingle-textarea-field v0.2.3

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

TextareaField 多行文本框 npm version

这是一个 tingle 组件,表单多行文本框,包括标题和表单。

Simple Usage

<TextareaField label="三个字" minRows={2} maxRows={5}
	placeholder="3个行高 最大5个行高" value={t.state.remark}
	onChange={t.handleChange.bind(t)}/>

<TextareaField label="只读" value="不能更改" readOnly={true}/>

可用配置

配置项类型默认值功能/备注
minRowsInterger1最小显示行
maxRowsInterger10最大行,超过则显示滚动条
placeholderString|提醒文案,默认空
readOnlyBooleanfalse是否只读,只读时不能输入,默认false
lineHeightInterger24行高
onChangeFunctionfunction() {}输入内容变化时触发
onFocusFunctionfunction() {}获取到输入焦点时触发
onBlurFunctionfunction() {}与pc端一致,鼠标离开时响应

事件

onChange(newValue, e)

// 新值和事件对象
handleChange(newValue,e) {

}

onFocus(e)

onBlur(e)

Links 相关链接