(table): add sub-table tree-table

This commit is contained in:
就眠儀式 2022-05-28 23:52:14 +08:00
parent 3e68cdf169
commit 62585e9e56
2 changed files with 9 additions and 9 deletions

View File

@ -65,7 +65,7 @@ const expandIconType = computed(() => {
const handleExpand = () => {
isExpand.value = !isExpand.value;
}
};
</script>
<template>
@ -100,12 +100,12 @@ const handleExpand = () => {
whiteSpace: column.ellipsisTooltip ? 'nowrap' : 'normal',
}"
>
<lay-icon
v-if="(slot.expand || data.children) && index === 0"
class="layui-table-cell-expand-icon"
:type="expandIconType"
@click="handleExpand"
></lay-icon>
<lay-icon
v-if="(slot.expand || data.children) && index === 0"
class="layui-table-cell-expand-icon"
:type="expandIconType"
@click="handleExpand"
></lay-icon>
<lay-tooltip
v-if="column.ellipsisTooltip"

View File

@ -141,7 +141,7 @@ function handleTitleClick(node: TreeData) {
class="layui-tree-pack layui-tree-showLine"
style="display: block"
>
<tree-node
<tree-node
:node-list="node.children"
:show-checkbox="showCheckbox"
:show-line="showLine"
@ -153,4 +153,4 @@ function handleTitleClick(node: TreeData) {
</div>
</lay-transition>
</div>
</template>
</template>