[Doc] new theme

This commit is contained in:
陈嘉涵
2019-05-15 20:53:04 +08:00
parent 3cae4288f2
commit d0f4169c86
130 changed files with 1460 additions and 1147 deletions
+14 -10
View File
@@ -1,17 +1,19 @@
## Field 输入框
# Field 输入框
`input``textarea`的输入框。
### 介绍
### 使用指南
表单中的输入框组件,支持`input``textarea`两种类型
### 引入
``` javascript
import { Field } from 'vant';
Vue.use(Field);
```
### 代码演示
## 代码演示
#### 基础用法
### 基础用法
通过 v-model 绑定输入框的值
@@ -21,7 +23,7 @@ Vue.use(Field);
</van-cell-group>
```
#### 自定义类型
### 自定义类型
根据`type`属性定义不同类型的输入框
@@ -47,7 +49,7 @@ Vue.use(Field);
</van-cell-group>
```
#### 禁用输入框
### 禁用输入框
```html
<van-cell-group>
@@ -60,7 +62,7 @@ Vue.use(Field);
</van-cell-group>
```
#### 错误提示
### 错误提示
通过`error`或者`error-message`属性增加对应的错误提示
@@ -81,7 +83,7 @@ Vue.use(Field);
</van-cell-group>
```
#### 高度自适应
### 高度自适应
对于 textarea,可以通过`autosize`属性设置高度自适应
@@ -98,7 +100,7 @@ Vue.use(Field);
</van-cell-group>
```
#### 插入按钮
### 插入按钮
通过 button 插槽可以在输入框尾部插入按钮
@@ -116,6 +118,8 @@ Vue.use(Field);
</van-cell-group>
```
## API
### Props
Field 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`placeholder`、`autofocus` 等