В Vue 1.x я обычно делал это:
Component1:
<template>
<v-dialog>
<slot name="activator" slot="activator"></slot>
</v-dialog>
</template>
Component2:
<template>
<component-1>
<slot name="activator" slot="activator"></slot>
</component-1>
</template>
Так что я мог сделать это в Component3:
<template>
<h3>I'm component 3</h3>
<component-2>
<template slot="activator">
<v-btn></v-btn>
</template>
</component-2>
</template>
Работало нормально. Но как я могу сделать то же самое, используя синтаксис Vue 2.6 v-slot
?
Замена "шаблона" slot
s в компонентах 1 и 2 этим не работает:
<template v-slot:activator="{on}">
<slot name="activator" v-on="on"></slot>
</template>
Я не могу найти способ проксирования слота "активатора" из v-диалога вплоть до компонента 3.