docs(Field): add more demos

This commit is contained in:
陈嘉涵
2020-01-09 14:38:39 +08:00
committed by neverland
parent a374c48ea9
commit 6d3d976b50
3 changed files with 95 additions and 9 deletions
+31 -2
View File
@@ -60,16 +60,45 @@ export default {
### Disabled
```html
<van-cell-group>
<van-field label="Text" value="Input Readonly" readonly />
<van-field label="Text" value="Input Disabled" disabled />
</van-cell-group>
```
### Show Icon
```html
<van-cell-group>
<van-field
v-model="value1"
label="Text"
value="Disabled"
disabled
left-icon="smile-o"
right-icon="warning-o"
placeholder="Show Icon"
/>
<van-field
v-model="value2"
clearable
label="Text"
left-icon="music-o"
placeholder="Show Clear Icon"
/>
</van-cell-group>
```
```js
export default {
data() {
return {
value1: '',
value2: '123'
};
}
};
```
### Error Info
Use `error` or `error-message` to show error info