Element UI 組件 Table 有一個屬性 border,添加它可以增加縱向邊框,但是無法控制橫線邊框,因此即使是最簡單的 el-table,也會包含一個底部橫線。
這個底部橫線其實是一個 border-bottom,不過對於表頭使用了 th 元素,對於表數據使用了 td 元素,因此修改的時候需要兼顧兩種元素。
如果你只是修改表數據的樣式,而不修改表頭,那只需修改 td 元素
修改方式:在 style 標簽添加如下樣式即可
//去掉表格內的線
table th,
table td {
border-bottom: none !important;
}
//去掉最下面的那一條線
.el-table::before {
height: 0px;
}
.customer-table .el-table__fixed-right::before,
.el-table__fixed::before {
width: 0;
}