Skip to content

Commit c09d1a5

Browse files
fix: fixed multiple v-models casing
1 parent 5bc4f7c commit c09d1a5

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/guide/component-custom-events.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ By leveraging the ability to target a particular prop and event as we learned be
103103

104104
Each v-model will sync to a different prop, without the need for extra options in the component:
105105

106+
```html
107+
<user-name
108+
v-model:first-name="firstName"
109+
v-model:last-name="lastName"
110+
></user-name>
111+
```
112+
106113
```js
107114
const app = Vue.createApp({})
108115

@@ -125,12 +132,12 @@ app.component('user-name', {
125132
})
126133
```
127134

128-
```html
129-
<user-name
130-
v-model:firstName="firstName"
131-
v-model:lastName="lastName"
132-
></user-name>
133-
```
135+
<p class="codepen" data-height="300" data-theme-id="39028" data-default-tab="html,result" data-user="Vue" data-slug-hash="GRoPPrM" data-preview="true" data-editable="true" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="Multiple v-models">
136+
<span>See the Pen <a href="https://codepen.io/team/Vue/pen/GRoPPrM">
137+
Multiple v-models</a> by Vue (<a href="https://codepen.io/Vue">@Vue</a>)
138+
on <a href="https://codepen.io">CodePen</a>.</span>
139+
</p>
140+
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>
134141

135142
## Handling `v-model` modifiers
136143

0 commit comments

Comments
 (0)