【发布时间】:2019-05-25 05:51:27
【问题描述】:
我已经定义了一个影子模板如下:
<table id="overviewbox-loadingbox">
<thead>
<tr>
<slot name="table-header"></slot>
</tr>
</thead>
<tbody>
<div id="loadingbox"></div>
</tbody>
</table>
用户应该通过以下方式提供自己的<th>s:
<th slot="table-header" data-column_name="description">describing here</th>
但是这不起作用。只要我将<th> 更改为<span>,并且所有其他内容都保持不变,就会出现开槽节点。这是因为有一些关于一起使用 <th> 和 <slot> 的无证怪癖吗?谢谢。
【问题讨论】:
标签: ecmascript-6 custom-element