<script>
export default {
  components: {},
  data() {
    return{
        suffixIconClick: function() {
          console.log(1)
        },
        inputChange: function(){
            console.log(1);
        }
    }
  }
}
</script>

# Input 输入框
通过鼠标或键盘输入字符。



## 基础用法
:::demo 使用`f-icon`嵌入图标
````html
<efly-input placeholder="请输入账号" v-model="value" width="300px" @input="inputChange"></efly-input>
<script>
export default {
  components: {},
  data() {
    return{
        value: "123456@efly.com",
    }
  }
}
</script>
````
:::

## 禁用
:::demo 使用`f-icon`嵌入图标
````html
<efly-input placeholder="请输入账号" v-model="value" width="300px" disabled></efly-input>
<efly-input class="mar-t-default" placeholder="请输入账号" type="textarea" v-model="value" width="300px" disabled></efly-input>
<script>
export default {
  components: {},
  data() {
    return{
        value: "123456@efly.com",
    }
  }
}
</script>
````
:::


## 带 icon 的输入框
带有图标标记输入类型
:::demo 使用`f-icon`嵌入图标
````html
<efly-input prefix-icon="icon-tips" placeholder="请输入账号"></efly-input>
<efly-input suffix-icon="icon-tips" placeholder="请输入账号" @iconClick="suffixIconClick"></efly-input>
````
:::

## 密码
用于输入多行文本信息，通过将 type 属性的值指定为 textarea。
:::demo 使用`f-icon`嵌入图标
````html
<efly-input 
    type="password" 
    placeholder="请输入账号" 
    value="123456@efly.com"
    width="300px"
></efly-input>
````
:::

## 文本域
用于输入多行文本信息，通过将 type 属性的值指定为 textarea。
:::demo 使用`f-icon`嵌入图标
````html
<efly-input 
    type="textarea" 
    placeholder="请输入账号" 
    value="123456@efly.com"
    width="300px"
></efly-input>
````
:::

## 输入长度限制
:::demo 使用`f-icon`嵌入图标
````html
<efly-input placeholder="请输入账号" maxlength="11"></efly-input>
<efly-input 
    class="mar-t-small"
    type="textarea" 
    placeholder="请输入账号" 
    maxlength="30"
></efly-input>
````
:::

## 尺寸
:::demo 使用`f-icon`嵌入图标
````html
<efly-input icon="tips" placeholder="请输入账号" maxlength="11"></efly-input>
<efly-input icon="tips" placeholder="请输入账号" maxlength="11" size="small"></efly-input>
<efly-input icon="tips" placeholder="请输入账号" maxlength="11" size="mini"></efly-input>

````
:::


## 参数说明
|   参数     |   说明    | 类型      | 可选值       | 默认值   |
|---------  |-------- |---------- |-------------  |-------- |
|size       |大小     | String  |    small / mini  |    —     |
|type       |类型     | String  |  input / textarea  |    input     |
|value      |绑定值    | string / number  |  —  |    —    |
|v-model    |双向绑定    | string / number  |  —  |    —    |
|maxlength  |原生属性，最大输入长度 | String  |     —        |    —     |
|placeholder|输入框占位文本 | String  |     	—        |   —   |
|width      |宽度         | String  |     	—        |   —   |
|align      |排列，与css一直 | String  |     	—        |   left   |

## 事件
| 事件名称      | 说明    | 回调参数   
|---------- |-------- |---------- |
| blur      | 光标移除事件   | $event  |
| focus     | 光标聚焦事件   | $event  |
| change    | 修改事件   | $event  |
| input     | 输入事件   | $event  |
