Answer the question
In order to leave comments, you need to log in
Why doesn't v-model work?
Hello!
I'm trying to use v-model with my component, please tell me why the searchText property does not change?
//MyInput.vue
<template>
<input type="text" class="search">
</template>
<script>
export default {
model: {
prop: 'value',
event: 'input'
}
}
</script>
<my-input v-model="searchText" />
<button >
{{ searchText }}
</button>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question