Ant Design

Antd Vue:自定义table表头内容

2022-12-29  本文已影响0人  东方晓

2022-12-30 周五

使用table中的插槽属性来完成,在定义标题的地方定义该标题的插槽名,然后在html中进行绘制。

一:定义插槽
        {
          key: 'title',
          dataIndex: 'title',
          slots:{ title:'title'}
        },
二、绘制html
<template slot="title">标题<a-icon type="edit"/></template>

效果如下:


上一篇下一篇

猜你喜欢

热点阅读