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