How to make slot inherit attributes?
What problem does this feature solve?
As shown below, I want to uniformly add some properties in a certain slot, and still carry these properties when the slot is replaced by the neir passed in by the parent component. How can I do this
// comp
<template>
<div>
<slot /> // Add an attribute abc='attr' somehow
</div>
</template>
// use comp
<Comp>
<div>hello</div>
</Comp>
// Renders as
<div>
<div abc='attr' >hello</div>
</div>
What does the proposed API look like?
I don't know if there is an official practice