✨(table): add sub-table tree-table
This commit is contained in:
parent
3e68cdf169
commit
62585e9e56
@ -65,7 +65,7 @@ const expandIconType = computed(() => {
|
|||||||
|
|
||||||
const handleExpand = () => {
|
const handleExpand = () => {
|
||||||
isExpand.value = !isExpand.value;
|
isExpand.value = !isExpand.value;
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -100,12 +100,12 @@ const handleExpand = () => {
|
|||||||
whiteSpace: column.ellipsisTooltip ? 'nowrap' : 'normal',
|
whiteSpace: column.ellipsisTooltip ? 'nowrap' : 'normal',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<lay-icon
|
<lay-icon
|
||||||
v-if="(slot.expand || data.children) && index === 0"
|
v-if="(slot.expand || data.children) && index === 0"
|
||||||
class="layui-table-cell-expand-icon"
|
class="layui-table-cell-expand-icon"
|
||||||
:type="expandIconType"
|
:type="expandIconType"
|
||||||
@click="handleExpand"
|
@click="handleExpand"
|
||||||
></lay-icon>
|
></lay-icon>
|
||||||
|
|
||||||
<lay-tooltip
|
<lay-tooltip
|
||||||
v-if="column.ellipsisTooltip"
|
v-if="column.ellipsisTooltip"
|
||||||
|
@ -141,7 +141,7 @@ function handleTitleClick(node: TreeData) {
|
|||||||
class="layui-tree-pack layui-tree-showLine"
|
class="layui-tree-pack layui-tree-showLine"
|
||||||
style="display: block"
|
style="display: block"
|
||||||
>
|
>
|
||||||
<tree-node
|
<tree-node
|
||||||
:node-list="node.children"
|
:node-list="node.children"
|
||||||
:show-checkbox="showCheckbox"
|
:show-checkbox="showCheckbox"
|
||||||
:show-line="showLine"
|
:show-line="showLine"
|
||||||
@ -153,4 +153,4 @@ function handleTitleClick(node: TreeData) {
|
|||||||
</div>
|
</div>
|
||||||
</lay-transition>
|
</lay-transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user