antd vue表头加图片以及气泡提醒

给需要自定义的表头添加配置


<a-table :dataSource="dataSource" :columns="columns" />


在columns中表头添加


columns: [ 
     { slots: { title: 'example' }, width: 150, dataIndex: 'example', ellipsis: true, scopedSlots: { customRender: 'exampleText' } },
]

其中slots中的title名:example 是表头的插槽名

其中scopedSlots中的title名:exampleText 是表内容的插槽名

然后开始插!


<!--回款比气泡-->
      <template slot="example">
        <a-tooltip overlayClassName="bgc_tooltip">
          <template slot="title">
            <div class="tipText">
              <p>我爱你</p>
              <p>好久不见</p>
            </div>
          </template>

          <div class="example">
            回款比
            <img alt="" src=""> //图片
          </div>
        </a-tooltip>
      </template>

使用a-tooltip组件,<template slot="title">中的内容就是气泡提醒的内容,会自动添加mouseenter显示和mouseleave消失的效果。

然后在其他内容中放了图片和文字作为插槽放入了表头

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值