|
|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div class="custom-table-wrapper" :class="{ 'no-border': !isBorder }"> |
|
|
|
<div class="custom-table-header" v-if="isBorder"> |
|
|
|
<div class="custom-table-header no-break" v-if="isBorder"> |
|
|
|
<div class="custom-table-row"> |
|
|
|
<div v-if="showSort" class="custom-table-cell header-cell sort-cell"> |
|
|
|
序号 |
|
|
|
@ -12,13 +12,13 @@ |
|
|
|
@change="handleCheckAllChange"></el-checkbox> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-for="(col, colIndex) in columns" :key="colIndex" class="custom-table-cell header-cell" |
|
|
|
<div v-for="(col, colIndex) in columns" :key="colIndex" class="custom-table-cell header-cell no-break" |
|
|
|
:style="getCellWidth(col)"> |
|
|
|
<div class="header-cell-content" v-if="col.headerColumns && col.headerColumns.length > 0"> |
|
|
|
<div class="header-columns-grid" |
|
|
|
:style="{ 'grid-template-columns': `repeat(${col.span || 2}, 1fr)` }"> |
|
|
|
<div v-for="(headerCol, headerIndex) in col.headerColumns" :key="headerIndex" |
|
|
|
class="header-column-item"> |
|
|
|
class="header-column-item" > |
|
|
|
<template v-if="headerCol.type === 'span'"> |
|
|
|
<div class="span-content">{{ $t(headerCol.label) }}</div> |
|
|
|
</template> |
|
|
|
@ -74,7 +74,7 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="custom-table-body"> |
|
|
|
<div v-for="(row, rowIndex) in localDataSource" :key="rowIndex" class="custometable-row"> |
|
|
|
<div v-for="(row, rowIndex) in localDataSource" :key="rowIndex" class="custometable-row no-break"> |
|
|
|
<div v-if="showSort" class="custom-table-cell body-cell sort-cell"> |
|
|
|
{{ rowIndex + 1 }} |
|
|
|
</div> |
|
|
|
@ -83,7 +83,7 @@ |
|
|
|
<el-checkbox v-model="row._checked" @change="handleCheckChange(row, $event)"></el-checkbox> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-for="(col, colIndex) in columns" :key="colIndex" class="custom-table-cell body-cell" |
|
|
|
<div v-for="(col, colIndex) in columns" :key="colIndex" class="custom-table-cell body-cell no-break" |
|
|
|
:style="getCellWidth(col)"> |
|
|
|
<div class="inner-table-cell"> |
|
|
|
<div class="flex1" :class="{ 'item-center': !isBorder && col.label }"> |
|
|
|
|