✨(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:selectedKeys="tableSelectedKeys"
|
||||||
v-model:selectedKey="tableSelectedKey"
|
v-model:selectedKey="tableSelectedKey"
|
||||||
>
|
>
|
||||||
<template v-for="name in slotsData" #[name]="slotProp: { data: any }">
|
<template v-for="name in slotsData" #[name]="slotProp: { data: any, column: any }">
|
||||||
<slot :name="name" :data="slotProp.data"></slot>
|
<slot :name="name" :data="slotProp.data" :column="slotProp.column"></slot>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="slot.expand" #expand="slotProp: { data: any }">
|
<template v-if="slot.expand" #expand="slotProp: { data: any, column: any }">
|
||||||
<slot name="expand" :data="slotProp.data"></slot>
|
<slot name="expand" :data="slotProp.data" :column="slotProp.column"></slot>
|
||||||
</template>
|
</template>
|
||||||
</table-row>
|
</table-row>
|
||||||
</template>
|
</template>
|
||||||
|
@ -685,7 +685,12 @@ onBeforeUnmount(() => {
|
|||||||
:style="[{ 'padding-right': `${scrollWidthCell}px` }]"
|
:style="[{ 'padding-right': `${scrollWidthCell}px` }]"
|
||||||
>
|
>
|
||||||
<div class="layui-table-header-wrapper" ref="tableHeader">
|
<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>
|
<colgroup>
|
||||||
<template v-for="column in tableBodyColumns" :key="column">
|
<template v-for="column in tableBodyColumns" :key="column">
|
||||||
<template v-if="tableColumnKeys.includes(column.key)">
|
<template v-if="tableColumnKeys.includes(column.key)">
|
||||||
@ -878,8 +883,10 @@ onBeforeUnmount(() => {
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<lay-empty v-if="tableDataSource.length == 0 && loading == false"></lay-empty>
|
<lay-empty
|
||||||
<div :style="{'width': tableBodyEmptyWidth }"></div>
|
v-if="tableDataSource.length == 0 && loading == false"
|
||||||
|
></lay-empty>
|
||||||
|
<div :style="{ width: tableBodyEmptyWidth }"></div>
|
||||||
<template v-if="loading == true">
|
<template v-if="loading == true">
|
||||||
<div class="layui-table-loading">
|
<div class="layui-table-loading">
|
||||||
<i
|
<i
|
||||||
|
Loading…
Reference in New Issue
Block a user