mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2025-01-10 16:29:12 +08:00
docs: update v-model [ci skip]
This commit is contained in:
parent
e898d0eaf8
commit
0e2253b6a8
@ -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
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -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
|
||||
})
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user