Since the event on the component defaults to a custom event, this example 中<child @click="handleClick"></child>
will not be recognized by the system as the click event we understand must be bound to it by the $ emit method.
In this way, it is a bit troublesome to define methods inside and outside the component, so what if you want to use native events directly on the component? Add a suffix .native to the event:
Obviously, we recommend the second method, the lack of code is not one line or two lines ~