docs: update v-model [ci skip]

This commit is contained in:
Amour1688 2020-09-22 11:55:34 +08:00
parent e898d0eaf8
commit 0e2253b6a8
2 changed files with 12 additions and 12 deletions

View File

@ -150,22 +150,22 @@ v-model
```
```jsx
<input v-model={[val, ['trim']]} />
<input v-model={[val, ['modifier']]} />
```
```jsx
<A v-model={[val, 'foo', ['bar']]} />
<A v-model={[val, 'argument', ['modifier']]} />
```
会变编译成:
```js
h(A, {
'foo': val,
"fooModifiers": {
"bar": true
'argument': val,
"argumentModifiers": {
"modifier": true
},
"onUpdate:foo": $event => val = $event
"onUpdate:argument": $event => val = $event
})
```

View File

@ -150,22 +150,22 @@ v-model
```
```jsx
<input v-model={[val, ['trim']]} />
<input v-model={[val, ['modifier']]} />
```
```jsx
<A v-model={[val, 'foo', ['bar']]} />
<A v-model={[val, 'argument', ['modifier']]} />
```
Will compile to:
```js
h(A, {
'foo': val,
"fooModifiers": {
"bar": true
'argument': val,
"argumentModifiers": {
"modifier": true
},
"onUpdate:foo": $event => val = $event
"onUpdate:argument": $event => val = $event
})
```