✨(component): 处理 column 在 tree-table 无法传递的问题
This commit is contained in:
parent
21c2b06d2c
commit
74ec3e108f
@ -622,11 +622,11 @@ const radioProps = props.getRadioProps(props.data, props.index);
|
||||
v-model:selectedKeys="tableSelectedKeys"
|
||||
v-model:selectedKey="tableSelectedKey"
|
||||
>
|
||||
<template v-for="name in slotsData" #[name]="slotProp: { data: any }">
|
||||
<slot :name="name" :data="slotProp.data"></slot>
|
||||
<template v-for="name in slotsData" #[name]="slotProp: { data: any, column: any }">
|
||||
<slot :name="name" :data="slotProp.data" :column="slotProp.column"></slot>
|
||||
</template>
|
||||
<template v-if="slot.expand" #expand="slotProp: { data: any }">
|
||||
<slot name="expand" :data="slotProp.data"></slot>
|
||||
<template v-if="slot.expand" #expand="slotProp: { data: any, column: any }">
|
||||
<slot name="expand" :data="slotProp.data" :column="slotProp.column"></slot>
|
||||
</template>
|
||||
</table-row>
|
||||
</template>
|
||||
|
@ -685,7 +685,12 @@ onBeforeUnmount(() => {
|
||||
:style="[{ 'padding-right': `${scrollWidthCell}px` }]"
|
||||
>
|
||||
<div class="layui-table-header-wrapper" ref="tableHeader">
|
||||
<table class="layui-table" :lay-size="size" :lay-skin="skin" ref="tableHeaderTable">
|
||||
<table
|
||||
class="layui-table"
|
||||
:lay-size="size"
|
||||
:lay-skin="skin"
|
||||
ref="tableHeaderTable"
|
||||
>
|
||||
<colgroup>
|
||||
<template v-for="column in tableBodyColumns" :key="column">
|
||||
<template v-if="tableColumnKeys.includes(column.key)">
|
||||
@ -878,8 +883,10 @@ onBeforeUnmount(() => {
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<lay-empty v-if="tableDataSource.length == 0 && loading == false"></lay-empty>
|
||||
<div :style="{'width': tableBodyEmptyWidth }"></div>
|
||||
<lay-empty
|
||||
v-if="tableDataSource.length == 0 && loading == false"
|
||||
></lay-empty>
|
||||
<div :style="{ width: tableBodyEmptyWidth }"></div>
|
||||
<template v-if="loading == true">
|
||||
<div class="layui-table-loading">
|
||||
<i
|
||||
|
Loading…
Reference in New Issue
Block a user