<table border style="width:100%;height:100%;" id="res_table">
<thead style="">
<tr style="background:rgb(204, 204, 204)">
<th style="padding:5px 0;text-align:center;min-width:130px;position:sticky;top:-2px;background:rgb(204, 204, 204)" v-for="(item,index) in columnsData" :key="index">{{item}}</th>
</tr>
</thead>
<tbody v-if="tableData.length>0">
<tr v-for="(item,index) in tableData" :key="index">
<td style="padding:5px;text-align:center;vertical-align:middle;white-space: nowrap;" v-for="(child,index) in item" :key="index">
<pre>{{child}}</pre>
</td>
</tr>
</tbody>
</table>
原生table 固定表头笔记
最新推荐文章于 2023-05-11 14:47:05 发布