How to use useVModel
/useVModels
with script setup
?
#856
Answered
by
wheatjs
darrylnoakes
asked this question in
Q&A
-
Just a question as to how to use I believe there is a Discord server or something for this sort of thing, but I couldn't find it. Sorry if I missed something obvious. |
Beta Was this translation helpful? Give feedback.
Answered by
wheatjs
Oct 19, 2021
Replies: 1 comment 3 replies
-
In So it would look something like <script setup>
import { useVModel } from '@vueuse/core'
const props = defineProps({ data: String })
const emit = defineEmits(['update:data'])
const data = useVModel(props, data, emit)
</script> |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
darrylnoakes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
<script setup>
you can usedefineProps
anddefineEmits
So it would look something like