Skip to content

"v-model cannot be used on a prop" error with Vue 3 (>= 3.2.45) #17112

Discussion options

You must be logged in to vote

Well, perhaps I was misunderstood, I didn't mean to say it's directly related to quasar.

Anyway, looks like that the whole problem revolved around props only.

I have several QDialog triggered by and QInput valued by props variables:

<q-dialog position="bottom" persistent v-model="toggleDialog">
    ...
</q-dialog>

<q-input
    filled
    readonly
    :label="$t('label.client')"
    v-model="clientName"
/>

props: {
    toggleDialog: {
        default: false,
    },
    clientName: {
        required: false,
    }
}

It was enough to replace v-model with :modelValue and the compiling error disappeared.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@nulele
Comment options

Answer selected by nulele
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants