export default { methods: { slotsVnode() { const { $scopedSlots } = this; if (!$scopedSlots) { return; } /** * 所有的 $slots 现在都会作为函数暴露在 $scopedSlots 中。 * 如果你在使用渲染函数,不论当前插槽是否带有作用域, * 我们都推荐始终通过 $scopedSlots 访问它们。 * 这不仅仅使得在未来添加作用域变得简单, * 也可以让你最终轻松迁移到所有插槽都是函数的 Vue 3 */ return Object.keys($scopedSlots).map((key) => ( )); }, }, };