前言

在使用el-table 表格中有些表格的表头需要加入一些提示,鼠标移入则出现提示,非常实用,我是通过el-table中的el-tooltip实现的,以下的效果预览
请添加图片描述

代码实现

  <el-table ref="multipleTable" :data="data" tooltip-effect="dark" border >
      <el-table-column prop="addtime" label="时间" align="center" width="150">
         <template slot="header">
            <div>
              <span>时间</span>
             <el-tooltip class="item" effect="dark" content="今日工单是操作工单时间,其他则是工单录入时间" placement="top">
              <span class="iconfont icon-wenhao" style="margin-left: 5px;"></span>
              </el-tooltip>
            </div>
        </template>
        </el-table-column>
  </el-table>
Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐