element
element copied to clipboard
How to modify the table hover effect
My page background color is black. But the table hover effect is white. It's too harsh.
怎么修改table的hover效果啊,我的页面是黑色,结果hover死活改不了,太刺眼了。
尝试下主题能力?
主题能力是官网旁边哪个主题? 设置成黑色,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: @.***>
用样式穿透,修改他的hover背景色看看
.el-table {
--el-table-row-hover-bg-color: #changeIt;
}
that's all
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;