在表格添加icon,且不破坏排序问题。

//标题
  <span slot="title_slot" >
         标题显示<a-tooltip title="这里是标题的图标哦,鼠标移到这里显示该提示哦"><a-icon type="question-circle-o"/></a-tooltip>      
        </span>
        <span slot="content_slot" slot-scope="text, record" style="cursor: pointer" >
     这里是内容哦
        </span>
 export default {
    data() {
      return {
 columns: [{
       //  把title注释掉
       // title:"",
        align: "center",
        sorter:true,
        dataIndex: 'guge_trend_sum',
        width: 300,
        //添加这个参数  title 设置标题, customRender 设置内容。
        //这个方法不会破坏排序,造成只能单向排序的问题。
        scopedSlots: {title:"title_slot",customRender: 'content_slot'}
      }]
      }
      }
      }
Logo

前往低代码交流专区

更多推荐