How vue components bind native events

Vue component binding native events must add .nativemodifiers to respond to events

If it is not used, it will be considered to listen to the custom event from the component, which is equivalent to in the sub-component: the click event is processed inside the sub-component and then the click event is sent out: $emit("click".fn)

    <back-top @click.native="backClick"/>

Guess you like

Origin blog.csdn.net/dwjdj/article/details/111769505