Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
SetupContext `attrs` doesn't contain `listeners` #590
Comments
Can you provide reproduction code and show what you trying to achieve? |
I'm trying to pass events to component by using <template>
<label>
<input type="text" v-bind="$attrs" />
</label>
</template>
<script>
export default {
inheritAttrs: false
}
</script> However it doesn't work. |
@pikax I think they are taking about this: <input v-bind="$attrs" v-on="$listeners"> where @Edge00 I think this is a misalignment and probably can't be polyfilled by this plugin. You might need to keep using the $ prefixed variables in the templates of Vue 2 at this moment and do the migration when upgrading to Vue 3. |
Exactly. It would be great if this usage can be aligned at Vue 3. |
According to the document https://vue-composition-api-rfc.netlify.app/api.html#setup
There is no listeners in SetupContext.
So i use
v-bind="attrs"
to pass event to component.But event listeners didn't passed to component.
Will this usage be aligned at vue3 or keep it is now?