具名插槽 柠檬仔_ 2023-05-07 32 阅读1分钟 占位,有内容传进来再显示 <slot name="left" v-if="$slots.left" /> 使用 <template #left> <div>使用</div> </template>