How apply all slot to children? #5962
Answered
by
tony19
yoyo837
asked this question in
Help/Questions
-
Beta Was this translation helpful? Give feedback.
Answered by
tony19
May 19, 2022
Replies: 3 comments 2 replies
-
I think you're asking how to forward the current component's slots to the <van-loading>
<template v-for="(_, slot) of $slots" v-slot:[slot]="scope">
<slot :name="slot" v-bind="scope" :key="slot" />
</template>
</van-loading> Edited to insert |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
yoyo837
-
I report it to issue #5964 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Vue should have this feature built in. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you're asking how to forward the current component's slots to the
<van-loading>
child component. That can be done like this:demo
Edited to insert
:key
binding on<slot>