element-ui 表格和 tooltip修改背景颜色和箭头颜色

简介: element-ui 表格和 tooltip修改背景颜色和箭头颜色

1、element-ui tooltip 文字提示 背景修改:

第一步:(先给tooltip设置class:popper-class防止其他部分的样式被覆盖,如下所示;)

<el-tooltip popper-class="tps" enterable content="这是提示内容。"placement="bottom">
  <i class="el-icon-warning-outline"></i>
</el-tooltip>

第二步:(以下代码根据实际情况,任选一个即可;)

.tps.el-tooltip__popper {
      background: red;
    }
// 深色系可以添加一个类 is-dark
.tps.el-tooltip__popper.is-dark {
      background: red;
    }
// 系可以添加一个类 is-light
.tps.el-tooltip__popper.is-light {
      background: red;
    }

 

2、element-ui tooltip 文字提示 三角形颜色修改

   说明: .el-tooltip__popper[x-placement^=“方向”] .popper__arrow:after

                border-方向-color: red

               .el-tooltip__popper[x-placement^=“方向”] .popper__arrow

               border-方向-color: red

代码如下:(注意:如果有背景色,请将透明度分开写,如下所示)

.el-tooltip__popper[x-placement^="top"] .popper__arrow:after,
    .el-tooltip__popper[x-placement^="top"] .popper__arrow {
      border-top-color: red;
      opacity: 0.5;
    }

3、el-table中里面的show-overfloe-tooltip修改样式

<el-table
        :data="tableData"
        :max-height="'753'"
        :tooltip-effect="'tooltipStyle’”     //重点
      >
        <el-table-column
          prop="replacereason"
          label="更改原因"
          :show-overflow-tooltip="true"
        ></el-table-column>
</el-table>
.is-tooltipStyle {
  background: #fff;
  color: #3759af;
  border: 1px solid rgb(158, 157, 157);
  font-size: 15px;
}
相关文章
|
4月前
|
JavaScript
vue中有关表格中的表格头中添加悬浮提示的ui问题
vue中有关表格中的表格头中添加悬浮提示的ui问题
54 0
|
6月前
|
编解码 前端开发 API
SAP UI5 里响应式表格的 minScreenWidth 属性讲解
SAP UI5 里响应式表格的 minScreenWidth 属性讲解
28 0
SAP UI5 里响应式表格的 minScreenWidth 属性讲解
|
16天前
【UI】 element ui 表格没有数据时用--填充
【UI】 element ui 表格没有数据时用--填充
20 2
|
19天前
基于sortablejs实现拖拽element-ui el-table表格行进行排序
基于sortablejs实现拖拽element-ui el-table表格行进行排序
|
1月前
element-ui实现表格单选的功能
element-ui实现表格单选的功能
12 0
|
5月前
|
JavaScript
element-ui表格数据样式及格式化案例
element-ui表格数据样式及格式化案例
|
3月前
|
前端开发 小程序
使用element UI-table表格列宽自适应 【已解决】
使用element UI-table表格列宽自适应 【已解决】
element-ui表格展开行每次只能展开一行
element-ui表格展开行每次只能展开一行
|
4月前
|
编解码
element-ui 表格滚动条(不同分辨率)自适应问题;
element-ui 表格滚动条(不同分辨率)自适应问题;
34 0
|
4月前
详解element-ui el-table表格中勾选checkbox(selection),高亮当前行高亮某一行(某一行设置特殊的样式)
详解element-ui el-table表格中勾选checkbox(selection),高亮当前行高亮某一行(某一行设置特殊的样式)

热门文章

最新文章