V-model is really just syntax sugar, sometimes we need to customize two-way binding data, this time you need to have some understanding of the essence of v-Model

When we write it this way

<my-component v-model='something'></my-componment>
Copy the code

It actually says something like this

<my-component v-bind:value='something' @input='something = arguments[0]'></my-component>
Copy the code

So when you want to bidirectionally bind the content of a child component to the value of the parent component, you take the value argument in the child component and fire the custom event input

props: {
    value: {
        default: ' '}}Copy the code
this.$emit('input', value)
Copy the code