- 
                    布局
 - 
                    表单
 - 
                    通知
 - 
                    导航
 - 
                    其它
 
输入框 KLInput
大小控制
可通过设置size来控制输入框的大小, 设置width来控制输入的宽度
sm: height=24pxmd: height=32px
  | 
单位
通过指定unit可在输入框末尾加上单位
  | 
表单项
  | 
  | 
输入框类型
通知指定type值限制输入框输入的内容
char: 任何字符串int: 整型数float:浮点数,可设置decimalDigits值来指定可输入几位小数
  | 
搜索(打开console,查看输出)
  | 
  | 
验证
通过rules设置验证规则
  | 
  | 
API
KLInput
KLInput
| Param | Type | Default | Description | 
|---|---|---|---|
| [options.data] | object | 
= 绑定属性 | |
| [options.data.value] | string | 
<=> 文本框的值 | |
| [options.data.type] | string | 
=> 文本框的类型, 6种类型:int, float, char,password (email, url暂未实现), | |
| [options.data.placeholder] | string | 
=> 占位符 | |
| [options.data.state] | string | 
<=> 文本框的状态 | |
| [options.data.maxlength] | number | 
=> 文本框的最大长度 | |
| [options.data.unit] | string | 
=> 单位 | |
| [options.data.clearable] | boolean | 
false | 
=> 是否显示清空图标 | 
| [options.data.rules] | Array.<object> | 
[] | 
=> 验证规则 | 
| [options.data.autofocus] | boolean | 
false | 
=> 是否自动获得焦点 | 
| [options.data.readonly] | boolean | 
false | 
=> 是否只读 | 
| [options.data.disabled] | boolean | 
false | 
=> 是否禁用 | 
| [options.data.visible] | boolean | 
true | 
=> 是否显示 | 
| [options.data.class] | string | 
=> 补充class | |
| [options.data.decimalDigits] | number | 
=> type=float时,最多输入几位小数的filter | |
| [options.data.required] | boolean | 
=> 【验证规则】是否必填 | |
| [options.data.hideTip] | boolean | 
false | 
=> 是否显示校验错误信息 | 
| [options.data.min] | number | 
=> 【验证规则】type=int/float时的最小值, type=char时,最小长度 | |
| [options.data.max] | number | 
=> 【验证规则】type=int/float时的最大值, type=char时,最大长度 | |
| [options.data.message] | string | 
=> 【验证规则】验证失败时,提示的消息 | |
| [options.data.size] | string | 
=> 组件大小, sm/md | |
| [options.data.width] | number | 
=> 组件宽度 | 
keyup 原生keyup事件Event
| Param | Type | Description | 
|---|---|---|
| MouseEvent | event | 
点击的鼠标事件 | 
blur 原生blur事件Event
| Param | Type | Description | 
|---|---|---|
| MouseEvent | event | 
点击的鼠标事件 | 
focus 原生focus事件Event
| Param | Type | Description | 
|---|---|---|
| MouseEvent | event | 
点击的鼠标事件 | 
change 原生change事件Event
| Param | Type | Description | 
|---|---|---|
| KeyBoardEvent | event | 
点击的鼠标事件 | 
input 原生input事件Event
| Param | Type | Description | 
|---|---|---|
| KeyBoardEvent | event | 
点击的鼠标事件 | 
search 点击搜索图标时触发Event
| Param | Type | Description | 
|---|---|---|
| MouseEvent | event | 
点击的鼠标事件 | 
      想让文档更完善?
      
        来 GitHub 提个 PR 吧!