网站首页
编程语言
数据库
系统相关
其他分享
编程问答
defineSlots
2024-07-29
2024-07-29 如何判断自定义组件中的slot是否被传入值==》defineSlots或this.$slots
假如你的自定义组件是这样:<template><div><button:class="`btn-${type}`"><slot></slot></button></div></template><script>exportdefault{name:"tButt