fix: 未设置 width 的 column 自动分配宽度
This commit is contained in:
parent
8a94ba4511
commit
223c6ab0c6
@ -270,7 +270,11 @@ onMounted(() => {
|
||||
<template v-for="column in columns" :key="column">
|
||||
<th
|
||||
class="layui-table-cell"
|
||||
:style="{ width: column.width, textAlign: column.align }"
|
||||
:style="{
|
||||
width: column.width,
|
||||
textAlign: column.align,
|
||||
flex: column.width ? 'none' : 'auto',
|
||||
}"
|
||||
v-if="tableColumnKeys.includes(column.key)"
|
||||
>
|
||||
<span>
|
||||
@ -335,6 +339,7 @@ onMounted(() => {
|
||||
:style="{
|
||||
width: column.width,
|
||||
textAlign: column.align,
|
||||
flex: column.width ? 'none' : 'auto',
|
||||
}"
|
||||
>
|
||||
<slot :name="column.customSlot" :data="data"></slot>
|
||||
@ -352,6 +357,7 @@ onMounted(() => {
|
||||
:style="{
|
||||
width: column.width,
|
||||
textAlign: column.align,
|
||||
flex: column.width ? 'none' : 'auto',
|
||||
}"
|
||||
>
|
||||
<span> {{ value }} </span>
|
||||
|
@ -270,7 +270,6 @@ export default {
|
||||
}
|
||||
,{
|
||||
title:"操作",
|
||||
width: "180px",
|
||||
customSlot:"operator",
|
||||
key:"operator"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user