设置elment ui plus 的el table的边框线

在这里插入图片描述
在这里插入图片描述

:**代码
设置类名,给奇偶行设置类名

const tableRowClassName = ({ rowIndex }) => {
	if (rowIndex % 2 === 0) {
		return 'yellow'
	} else {
		return 'orange'
	}
}
const headerRowStyle = (args) => {
	return {
		height: '50px',
		backgroundColor: '#03102d'
	}
}
<style lang="less" scoped>
// 第二个弹框的table的每行颜色
:deep(.yellow) {
	background: transparent !important;
	height: 60px;
	// border-bottom: 1px solid transparent !important;

}

:deep(.orange) {
	height: 60px;
	background: #051034 !important;
	box-shadow: inset 0px 0px 0px 3px #072655;
}

//设置表头
::v-deep .el-table th.is-leaf {
	//去除表头的线
	// border: none;
	background: #051034 !important;
	height: 60px !important;
	font-size: 20px;
	font-weight: 400;
	color: aliceblue;
	border-bottom: 3px solid #072655 !important;
	border-top: 3px solid #072655 !important;

	//表头是很多小长方形排列的,选取第一个和最后一个元素设置border
	&:nth-child(1) {
		border-left: 3px solid #072655 !important;
	}

	&:last-child {
		border-right: 3px solid #072655 !important;

	}
}

//设置表格内容区域背景色为透明色
:deep(.el-table,
	.el-table__expanded-cell) {
	background-color: transparent;
	color: aliceblue;
	font-size: large;
	font-weight: 400;
}

//鼠标移动到每行透明色
::v-deep .el-table__row:hover>td {
	background-color: transparent !important;
}

.table {

	//去除table item每行的线
	:deep(.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf) {
		border-bottom: none !important;
	}

	//去除table最后一行的线
	:deep(.el-table__inner-wrapper::before) {
		background-color: transparent;
	}

}
</style>
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值