[Doc] fix field wrong spelling (#1141)

This commit is contained in:
neverland
2018-05-23 15:33:04 +08:00
committed by GitHub
parent cb992ce979
commit dd5d54ba0f
6 changed files with 21 additions and 21 deletions

View File

@@ -77,7 +77,7 @@ export default {
| Event | Description | Arguments |
|-----------|-----------|-----------|
| save | Triggered when click save button | contentform content |
| focus | Triggered when focus field | key: filed name |
| focus | Triggered when focus field | key: field name |
| delete | Triggered when confirm delete | contentform content |
| cancel-delete | Triggered when cancel delete | contentform content |
| select-search | Triggered when select search result | value: search content |

View File

@@ -264,9 +264,9 @@ test('show search result', done => {
}
});
const filed = wrapper.findAll('.van-field__control').at(2);
const input = filed.element;
filed.trigger('focus');
const field = wrapper.findAll('.van-field__control').at(2);
const input = field.element;
field.trigger('focus');
const items = wrapper.findAll('.van-icon-location');
items.at(0).element.parentNode.click();
@@ -276,7 +276,7 @@ test('show search result', done => {
items.at(2).element.parentNode.click();
expect(input.value).toEqual('address2');
filed.trigger('blur');
field.trigger('blur');
setTimeout(() => {
done();
}, 150);

View File

@@ -10,7 +10,7 @@ Vue.use(Field);
### Usage
#### Basic Usage
The value of filed is bound with v-model.
The value of field is bound with v-model.
```html
<van-cell-group>
@@ -19,7 +19,7 @@ The value of filed is bound with v-model.
```
#### Custom type
Use `type` prop to custom diffrent type fileds.
Use `type` prop to custom diffrent type fields.
```html
<van-cell-group>
@@ -75,7 +75,7 @@ Use `error` or `error-message` to show error info
```
#### Auto resize
Textarea Filed can be auto resize when has `autosize` prop
Textarea Field can be auto resize when has `autosize` prop
```html
<van-cell-group>
@@ -109,12 +109,12 @@ Use button slot to insert button
```
### API
Filed support all native properties of input tagsuch as `maxlength`、`placeholder`、`readonly`、`autofocus`
Field support all native properties of input tagsuch as `maxlength`、`placeholder`、`readonly`、`autofocus`
| Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------|
| value | Filed value | `String` | - |
| label | Filed label | `String` | - |
| value | Field value | `String` | - |
| label | Field label | `String` | - |
| type | Input type | `String` | `text` |
| disabled | Disable field | `Boolean` | `false` |
| error | Whether to show error info | `Boolean` | `false` |
@@ -124,11 +124,11 @@ Filed support all native properties of input tagsuch as `maxlength`、`placeh
| left-icon | Left side icon name | `String` | - |
### Event
Filed support all native events of input tagsuch as `focus`、`blur`、`keypress`
Field support all native events of input tagsuch as `focus`、`blur`、`keypress`
| Event | Description | Parameters |
|-----------|-----------|-----------|
| click-icon | Triggered when click the icon of filed | - |
| click-icon | Triggered when click the icon of Field | - |
### Slot

View File

@@ -111,7 +111,7 @@ Vue.use(Field);
```
### API
Filed 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`placeholder`、`readonly`、`autofocus` 等
Field 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`placeholder`、`readonly`、`autofocus` 等
| 参数 | 说明 | 类型 | 默认值 |
|-----------|-----------|-----------|-------------|-------------|
@@ -126,7 +126,7 @@ Filed 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`pla
| left-icon | 输入框左侧图标 (可选值见 Icon 组件) | `String` | - |
### Event
Filed 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`keypress` 等
Field 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`keypress` 等
| 事件 | 说明 | 回调参数 |
|-----------|-----------|-----------|