Skip to content

Commit dac423a

Browse files
committed
docs: use twoslash for interop.md
1 parent 0a5b315 commit dac423a

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

docs/introduction/interop.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import App from './App.tsx'
3030
createApp(App).use(vaporInteropPlugin).mount('#app')
3131
```
3232

33-
```tsx [App.tsx] twoslash1
33+
```tsx [App.tsx] twoslash
3434
import {
3535
computed,
3636
defineComponent,
@@ -51,11 +51,7 @@ export default defineComponent(() => {
5151
const compRef = useRef()
5252
return () => (
5353
<>
54-
<input
55-
value={count.value}
56-
onInput={(e) => (count.value = +e.currentTarget.value)}
57-
/>
58-
54+
<input v-model={count.value} />
5955
<Comp count={count.value} ref={compRef}></Comp>
6056
{compRef.value?.double}
6157
</>
@@ -93,7 +89,7 @@ import App from './App.tsx'
9389
createVaporApp(App).use(vaporInteropPlugin).mount('#app')
9490
```
9591

96-
```tsx [App.tsx] twoslash1
92+
```tsx [App.tsx] twoslash
9793
import {
9894
computed,
9995
defineComponent,
@@ -114,11 +110,7 @@ export default defineComponent(() => {
114110
const compRef = useRef()
115111
return () => (
116112
<>
117-
<input
118-
value={count.value}
119-
onInput={(e) => (count.value = +e.currentTarget.value)}
120-
/>
121-
113+
<input v-model={count.value}/>
122114
<Comp count={count.value} ref={compRef}></Comp>
123115
{compRef.value?.double}
124116
</>

0 commit comments

Comments
 (0)