记得要将 highlight-current-row 高亮属性打开
<template
>
<el
-table
highlight
-current
-row
:data
="table1"
:row
-style
="{height: '20px'}"
:header
-cell
-style
="{background:'#e6e6e6',color:'#000000'}"
border
style
="width: 30%;">
<el
-table
-column
prop
="date"
label
="选择一级分类"
width
="125">
</el
-table
-column
>
</el
-table
>
</template
>
利用css改变选择的行背景颜色,字体颜色…
<style>
.el-table__body tr.current-row>td{
background-color: #ebf0f1 !important;
color: #000000;
font-weight: 700;
}
</style>
转载请注明原文地址:https://blackberry.8miu.com/read-34419.html