Every time I need to use custom v-model
in Vue, I need to look up the docs. So I'm writing this down.
v-model
Vue2 custom Component:
html
template>
<input :value="value" @input="$emit('input', $event)" />
<template>
</
script>
<export default {
: "MyComp",
name: {
props: Boolean,
value
},
};script>
</
Usage:
html
template>
<my-comp v-model="myValue"></my-comp>
<template>
</