🐛(component): table 组件 columns 宽度超出 table-box 时错位

This commit is contained in:
就眠儀式
2022-04-26 21:49:56 +08:00
parent 622ba49cf4
commit 113382c4f7
7 changed files with 13 additions and 32 deletions

View File

@@ -271,9 +271,8 @@ onMounted(() => {
<th
class="layui-table-cell"
:style="{
width: column.width,
textAlign: column.align,
flex: column.width ? '0 0 auto' : '1',
flex: column.width ? '0 0 ' + column.width : '1',
}"
v-if="tableColumnKeys.includes(column.key)"
>
@@ -337,9 +336,8 @@ onMounted(() => {
<td
class="layui-table-cell"
:style="{
width: column.width,
textAlign: column.align,
flex: column.width ? '0 0 auto' : '1',
flex: column.width ? '0 0 ' + column.width : '1',
}"
>
<slot :name="column.customSlot" :data="data"></slot>
@@ -355,9 +353,8 @@ onMounted(() => {
v-if="column.key == key"
class="layui-table-cell"
:style="{
width: column.width,
textAlign: column.align,
flex: column.width ? '0 0 auto' : '1',
flex: column.width ? '0 0 ' + column.width : '1',
}"
>
<span> {{ value }} </span>