|
|
@@ -7,7 +7,7 @@ import BodyTds from "@@@/table/partials/body/BodyTds.vue"
|
|
|
const props = defineProps<{
|
|
|
row: any
|
|
|
index: number
|
|
|
- orgh: number
|
|
|
+ depth: number
|
|
|
}>()
|
|
|
|
|
|
const propOpts = inject(symbolKeys.bodyTr, {
|
|
|
@@ -30,7 +30,7 @@ const selectedIds = toRef(propOpts.selectedIds)
|
|
|
const tableBox = inject(symbolKeys.tableBox) as Ref<HTMLElement>
|
|
|
|
|
|
const isExpand = computed(() => {
|
|
|
- return propOpts.isLazy ? true : propOpts.expandDepth > props.orgh
|
|
|
+ return propOpts.isLazy ? true : propOpts.expandDepth > props.depth
|
|
|
})
|
|
|
|
|
|
const hasChildren = computed(() => {
|
|
|
@@ -42,7 +42,7 @@ const getTrClass = computed(() => {
|
|
|
if (hasChildren.value) {
|
|
|
_trClass += `hasChildren ${isExpand.value ? "tr-expand" : "tr-collapse"} `
|
|
|
}
|
|
|
- _trClass += !propOpts.isLazy && props.orgh > propOpts.expandDepth ? "hide" : "show"
|
|
|
+ _trClass += !propOpts.isLazy && props.depth > propOpts.expandDepth ? "hide" : "show"
|
|
|
return _trClass
|
|
|
})
|
|
|
function getParent(row: any) {
|
|
|
@@ -86,7 +86,7 @@ const onDbRowClick = () => {
|
|
|
:is-tree="propOpts.isTree"
|
|
|
:hasChildren="hasChildren"
|
|
|
:isExpand="isExpand"
|
|
|
- :orgh="orgh">
|
|
|
+ :depth="depth">
|
|
|
<template v-for="(_, name) in $slots" #[name]="{ row }">
|
|
|
<slot :name="name" :row="Object.assign({}, row)" />
|
|
|
</template>
|