.native
modifiers JS-0655To migrate to Vue 3.x, consider making the following changes:
- .native
modifier for v-on
will be removed.
- this.$listeners
will be removed.
- inheritAttrs: false
now affects class
and style
.
- this.$attrs
now contains everything passed to the component
- Functional components attribute fallthrough behavior adjusted:
- With explicit props declaration: full fallthrough like stateful components.
- With no props declaration: only fallthrough for class
, style
and v-on
listeners.
<CoolInput v-on:keydown.native="onKeydown" />
<CoolInput @keydown.enter.native="onKeydownEnter" />
<CoolInput v-on:keydown.enter="onKeydownEnter" />
<CoolInput @keydown.enter="onKeydownEnter" />