docs(Field): add more demos
This commit is contained in:
+31
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user