当前位置:   article > 正文

elementui table表格 点击行实现高亮_amis 与element ui

amis 与element ui

记得要将 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>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15

利用css改变选择的行背景颜色,字体颜色…

<style>
/* 设置当前页面elementui table 选中行时的背景色*/
.el-table__body tr.current-row>td{
 	background-color: #ebf0f1 !important;
  	color: #000000;
  	font-weight: 700;
}
</style>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/114519
推荐阅读
相关标签