vue project, a parent component contains two same paging components. If I click on the next page event of one of the pages, I will pass this event to the parent component. How does the parent component know which child page component passed it
vue project, a parent component contains two same paging components. If I click on the next page event of one of the pages, I will pass this event to the parent component. How does the parent component know which child page component passed it
when different components trigger events, just pass a different parameter
pass different parameters
you can pass a unique attribute to the child component, such as id
or data-id
. When the child component triggers the event, bring the uniqueness of the current component id
.
Previous: React _ this.refs.input.focus (); does not work in ios
Next: How to deal with the small program code scene generated through interface B with Chinese?