When used within a Vue.js component, $attrs and $listeners provide a convenient way to handle the attributes and event listeners passed to the component.
1.$attrs is an object that contains props passed by the parent component to the current component but not declared by the current component. This is useful for implementing "transparent transmission".
2.$listeners is also an object. It contains all event listeners passed by the parent component to the current component.
Example:
Pass value down: $attrs
Ye components:
Parent component:
Subassembly :
Upload the value:
Ye components:
Parent component:
Subassembly: