🐛(component): table 边框不对其的问题
This commit is contained in:
parent
dec00677f4
commit
6a7a429c13
@ -125,7 +125,7 @@ const childrenIndentSize = props.currentIndentSize + props.indentSize;
|
||||
|
||||
const renderFixedStyle = (column: any, columnIndex: number) => {
|
||||
if (column.fixed) {
|
||||
if(column.fixed == 'left') {
|
||||
if (column.fixed == "left") {
|
||||
var left = 0;
|
||||
for (var i = 0; i < columnIndex; i++) {
|
||||
left = left + props.columns[i]?.width.replace("px", "");
|
||||
@ -139,7 +139,7 @@ const renderFixedStyle = (column: any, columnIndex: number) => {
|
||||
return `right:${right}px`;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -252,7 +252,7 @@ props.dataSource.map((value: any) => {
|
||||
|
||||
const renderFixedStyle = (column: any, columnIndex: number) => {
|
||||
if (column.fixed) {
|
||||
if(column.fixed == 'left') {
|
||||
if (column.fixed == "left") {
|
||||
var left = 0;
|
||||
for (var i = 0; i < columnIndex; i++) {
|
||||
left = left + props.columns[i]?.width.replace("px", "");
|
||||
@ -266,7 +266,7 @@ const renderFixedStyle = (column: any, columnIndex: number) => {
|
||||
return `right:${right}px`;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -344,16 +344,22 @@ const renderFixedStyle = (column: any, columnIndex: number) => {
|
||||
/>
|
||||
</div>
|
||||
</th>
|
||||
<template v-for="(column, columnIndex) in columns" :key="column">
|
||||
<template
|
||||
v-for="(column, columnIndex) in columns"
|
||||
:key="column"
|
||||
>
|
||||
<th
|
||||
v-if="tableColumnKeys.includes(column.key)"
|
||||
class="layui-table-cell"
|
||||
:class="[
|
||||
column.fixed ? `layui-table-fixed-${column.fixed}` : '',
|
||||
]"
|
||||
:style="[{
|
||||
:style="[
|
||||
{
|
||||
textAlign: column.align,
|
||||
},renderFixedStyle(column,columnIndex)]"
|
||||
},
|
||||
renderFixedStyle(column, columnIndex),
|
||||
]"
|
||||
>
|
||||
<span>
|
||||
<template v-if="column.titleSlot">
|
||||
|
Loading…
x
Reference in New Issue
Block a user