el-table 三角形提示

<template>
  <div>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="ddd" label="日期2" width="150" />
      <el-table-column prop="ddd" label="日期2" width="150">
        <template slot-scope="scope">
          <el-tooltip effect="light" :content="scope.row.ddd" placement="top" popper-class="tipclass">
            <div v-html="scope.row.ddd" slot="content"></div>
            <div class="tooltips">{{ scope.row.ddd }}</div>
          </el-tooltip>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data () {
    return {
      tableData: [
        {
          ddd: '11111111111111111111111111111111111111111111111111'
        }
      ]
    }
  }
}
</script>

<style lang="less" >
.tipclass[x-placement^='top'] .popper__arrow {
  border-top-color: #fff !important;
  opacity: 1;
  position: relative;
  &::before {
    position: absolute;
    bottom: -9px;
    left: calc(50% - 10px);
    overflow: hidden;
    width: 8px;
    height: 8px;
    background: #fff;
    border-left: 1px solid #28b3f9;
    border-top: 1px solid #28b3f9;
    -webkit-transform: rotate(225deg);
    -moz-transform: rotate(225deg);
    -o-transform: rotate(225deg);
    transform: rotate(225deg);
    content: '';
  }
}

.tipclass {
  border: 1px solid #28b3f9 !important;
  color: red;
}
.tooltips {
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis; // ...展示
  display: -webkit-box; // 弹性伸缩盒盒子模型显示
  -webkit-line-clamp: 1; // 行数
  -webkit-box-orient: vertical; // 从上到下垂直排列子元素
}
</style>

相关推荐

  1. el-table

    2024-04-26 06:28:03       35 阅读
  2. ruoyi el-table调整

    2024-04-26 06:28:03       60 阅读
  3. elemeentui el-table封装

    2024-04-26 06:28:03       46 阅读
  4. 监听el-table滚动

    2024-04-26 06:28:03       31 阅读
  5. el-table-column叠加el-popover使用

    2024-04-26 06:28:03       36 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-26 06:28:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-26 06:28:03       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-26 06:28:03       82 阅读
  4. Python语言-面向对象

    2024-04-26 06:28:03       91 阅读

热门阅读

  1. 6.Linux常用命令---文件目录管理(3)

    2024-04-26 06:28:03       27 阅读
  2. AR模块中通用对账的优化尝试

    2024-04-26 06:28:03       29 阅读
  3. CocoaPods使用详解

    2024-04-26 06:28:03       26 阅读
  4. 39 vue.js

    2024-04-26 06:28:03       32 阅读
  5. MATLAB初学者入门(16)—— 图搜索算法

    2024-04-26 06:28:03       35 阅读
  6. 4、Flink执行模式(流/批)详解(下)

    2024-04-26 06:28:03       32 阅读
  7. golang 锁bug 记录

    2024-04-26 06:28:03       32 阅读
  8. HCIP-Datacom-ARST必选题库_ICMP【3道题】

    2024-04-26 06:28:03       32 阅读
  9. Dockerfil 构建上下文 build -f 选项 加快构建速度

    2024-04-26 06:28:03       41 阅读
  10. 关于kafka,关于消息队列、消息协议

    2024-04-26 06:28:03       32 阅读