-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Description
What problem does this feature solve?
I have a component which looks similar to this
<template>
<div>{{ modelValue }}</div>
<div>Some other content</div>
</template>
<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
props: {
modelValue: String
},
setup() {
return { };
}
});
</script>
whenever I use v-model
on the component <my-component v-model="value" />
which has multiple roots it always gives warnings
[Vue warn]: Extraneous non-emits event listeners (update:modelValue) were passed to component but could not be
automatically inherited because component renders fragment or text root nodes. If the listener is intended to be
a component custom event listener only, declare it using the "emits" option.
at <my-component modelValue=null onUpdate:modelValue=fn >
can multi roots be supported with v-model
without warnings? Or any way to wrap it with non-renderable tag?
What does the proposed API look like?
none
Metadata
Metadata
Assignees
Labels
No labels