第一种方法:会出现警告 [Element Warn][TableColumn]Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header.
1.在<el-table-column>上定义:render-header调用自定义表头方法,如图举例
2.在methods:{}方法里面自定义表头方法,如图举例
第二种方法: 使用scoped-slot(更简单且简洁无警告)
1.在<el-table-column>上使用scoped-slot
2.<template>绑定slot,然后自定义你所需要的内容
如图举例
© 版权声明
文章版权归作者所有,未经允许请勿转载。
相关文章
暂无评论...