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

View File

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