| | |
| | | <template> |
| | | <div> |
| | | <el-table :max-height="height" :data="data" border> |
| | | <el-table :max-height="height" :data="data" > |
| | | <el-table-column min-width="110" :sort-method="sortAge" v-for="column in columns" :key="column.prop" :label="column.label" header-align="center"> |
| | | <template slot-scope="scope"> |
| | | <template slot-scope="scope" class="font-family"> |
| | | <template v-if="column.type === 'image'"> |
| | | <el-image :src="scope.row[column.prop]" alt="加载失败"></el-image> |
| | | </template> |
| | |
| | | height: 70px; |
| | | } |
| | | /* 表头 */ |
| | | ::v-deep .el-table__header{ |
| | | margin-bottom: .02rem; |
| | | } |
| | | ::v-deep .el-table__header th { |
| | | background-color: #5879a4; |
| | | height: .3rem; |
| | | line-height: .3rem; |
| | | font-size: .14rem; |
| | | background-color: #597AA5; |
| | | color: white; /* 表头文字颜色为白色,增加对比度 */ |
| | | margin-bottom: .02rem !important; |
| | | } |
| | | /* 表格 */ |
| | | ::v-deep .el-table__body td { |
| | | background-color: #ebf3fe; |
| | | color: #000; |
| | | background-color:#DDE8F6; |
| | | height: .3rem; |
| | | line-height: .3rem; |
| | | font-size: .14rem; |
| | | color: #2C2C2C !important; |
| | | border-bottom: .02rem solid #fff; |
| | | } |
| | | /* ::v-deep .el-table__body { |
| | | border-bottom: .02rem solid #fff !important; |
| | | } */ |
| | | ::v-deep .el-table .el-table__cell{ |
| | | font-size: 9px; |
| | | padding: 0; |