I’ve got a myInput.vue
component which accepts a v-model
prop and captures the value of v-model
as modelValue
, like so:
<template>
<input type="text" :value="modelValue" />
</template>
<script setup>
const props = defineProps({
modelValue: {
type: [String, null],
required: true
}
})
</script>
If I’m using v-bind
as opposed to v-model
, how would I go about capturing the value from within the component? Using bindValue
doesn’t work.