|
|
|
@ -36,7 +36,10 @@ |
|
|
|
<div v-for="(col, colIndex) in columns" :key="colIndex" class="custom-table-cell body-cell" |
|
|
|
:style="getCellWidth(col)"> |
|
|
|
<div class="inner-table-cell"> |
|
|
|
<div class="flex1"> |
|
|
|
<div class="flex1" :class="{'item-center': !isBorder && col.label}"> |
|
|
|
<div v-if="!isBorder && col.label" class="mr-5"> |
|
|
|
{{ $t(col.label) }} |
|
|
|
</div> |
|
|
|
<template v-if="col.bodyType === 'input'"> |
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex" |
|
|
|
:fieldItemLabel="fieldItemLabel" type="input" |
|
|
|
@ -97,6 +100,11 @@ |
|
|
|
{{ row[col.prop] }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template v-else-if="col.bodyType === 'span'"> |
|
|
|
<div class="body-span"> |
|
|
|
{{ row[col.prop] }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div v-show="isShowOther(row[col.prop], col)" class="flex flex1"> |
|
|
|
@ -146,7 +154,7 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 默认操作栏 --> |
|
|
|
<div class="custom-table-cell body-cell" :style="{ width: '245px' }" v-if="showOperation"> |
|
|
|
<div class="custom-table-cell body-cell" :style="{ width: isBorder ? '245px' : 'auto' }" v-if="showOperation"> |
|
|
|
<div class="inner-table-cell"> |
|
|
|
<slot name="operation" :row="row" :rowIndex="rowIndex" :columns="getOperationColumns()"> |
|
|
|
</slot> |
|
|
|
@ -765,6 +773,7 @@ export default { |
|
|
|
border-right: none; |
|
|
|
} |
|
|
|
.custometable-row { |
|
|
|
display: flex; |
|
|
|
border-bottom: none; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -926,4 +935,11 @@ export default { |
|
|
|
.body-span { |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
.item-center { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
.mr-5{ |
|
|
|
margin-right: 5px; |
|
|
|
} |
|
|
|
</style> |