element icon indicating copy to clipboard operation
element copied to clipboard

How to modify the table hover effect

Open yuanpinhao opened this issue 2 years ago • 5 comments

My page background color is black. But the table hover effect is white. It's too harsh.

怎么修改table的hover效果啊,我的页面是黑色,结果hover死活改不了,太刺眼了。 image

yuanpinhao avatar Feb 20 '23 03:02 yuanpinhao

尝试下主题能力?

webvs2 avatar Feb 20 '23 12:02 webvs2

主题能力是官网旁边哪个主题? 设置成黑色,hover还是白色,具体怎么修改这个hover的类属性?

@.***

From: yang Date: 2023-02-20 20:49 To: ElemeFE/element CC: yuanpinhao; Author Subject: Re: [ElemeFE/element] How to modify the table hover effect (Issue #22395) 尝试下主题能力? ― Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

yuanpinhao avatar Feb 20 '23 13:02 yuanpinhao

用样式穿透,修改他的hover背景色看看

ChenChongFu avatar Feb 20 '23 16:02 ChenChongFu

.el-table {
  --el-table-row-hover-bg-color: #changeIt;
}

that's all

lustan3216 avatar Oct 11 '23 19:10 lustan3216

handleCellEnterLeave() { this.removeHoverEffect(); }, //移除row的hover效果 removeHoverEffect() { if (!this.tableDom) { this.tableDom = this.$refs.table.$el; } this.tableDom.classList.remove("el-table--enable-row-hover"); }, 用单元格的进入离开事件即可,记得在表格挂载的时候运行:this.$refs.table.layout.store.states.isComplex = false;

Kento97 avatar Dec 06 '23 02:12 Kento97