-
效果
-
全局样式添加
<style>
// 表格高亮选中样式
.el-table__body tr.current-row>td{
background-color: #e6f7ff !important;
}
</style>
- 设置默认配置
// el-table默认配置
Element.Table.props.highlightCurrentRow = { type: Boolean, default: true }
// 注意是在挂载Element前 设置上面的语句
Vue.use(Element, {
size: Cookies.get('size') || 'medium' // set element-ui default size
})