Skip to content

Do you have an v-model example? #6

@yooouuri

Description

@yooouuri

I am trying the new Composition API but I am not getting v-model on a custom component working...

<custom-component v-model="something"></custom-component>

Inside the custom component, I have a prop called value and a watcher on the prop. But the watcher doesn't trigger..

export default {
        props: {
            value: Boolean,
        },
watch(props.value, (value, value2) => {
                console.info(value);
                console.info(value2);
            });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions