小白求助, 为什么slot没有效果
粉丝福利 : 关注VUE中文社区公众号,回复视频领取粉丝福利
为什么这个slot无效? , 而我试验p标签使用这个slot是有效的
<parent-el>
<tr slot="thead">
<th>姓名</th>
<th>年龄</th>
<th>学历</th>
</tr>
</parent-el>
Vue.component('parent-el', {
template:'<table class="table table-hover text-center table-bordered">\
<thead>\
<slot name="thead"></slot>\
</thead>\
<tbody>\
</tbody>\
</table>'
});