Subscribe on changes!

Custom component event @change same as @change.native?

avatar
Jan 8th 2021

Version

3.0.5

Reproduction link

https://stackblitz.com/edit/vue-qfisdz?file=src%2FApp.vue

Steps to reproduce

Add @change to my custom Input Component, and my component didn't $emit('change'), it should not be triggered, but @change is same as @change.native, it trigger like native

What is expected?

@change should not be triggered

What is actually happening?

@change triggered just same as @change.native


Is it a feature? because in vue2, if i do not handle event, It should not be triggered, but in vue3, @change same as @change.native

avatar
Jan 8th 2021

See https://v3.vuejs.org/guide/component-attrs.html#attribute-inheritance

Thanks for reply, That would be great, We don't have to duplicate redeclare props from other component