<div>
<div><slot name="TabBar"></slot></div>
</div>
<div>
<div><slot name="TabBarItem-icon"></slot></div>
<div><slot name="TabBarItem-text"></slot></div>
</div>
为什么在我父组件的插槽中,增加了name="TabBar",App中的内容会无法显示呢?
上面代码是你的子组件吧,像下面这样在父组件中使用就可以显示插槽的内容,并进行传值之类的
<template v-slot:TabBar>
<div class="my">
</div>
</template>