Skip to content

Commit b7b7d72

Browse files
committed
fix: Dynamic left padding on collapse elements. #200
1 parent f098ee1 commit b7b7d72

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/components/Tree/index.vue

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
}"
88
@scroll="virtual ? handleTreeScroll() : undefined"
99
:style="
10-
showLineNumber ? { paddingLeft: `${Number(flatData.length.toString().length) * 12}px` } : {}
10+
showLineNumber
11+
? { paddingLeft: `${Number(originFlatData.length.toString().length) * 12}px` }
12+
: {}
1113
"
1214
>
1315
<div class="vjs-tree-list" :style="virtual && { height: `${height}px` }">
@@ -46,11 +48,7 @@
4648
:style="itemHeight && itemHeight !== 20 ? { lineHeight: `${itemHeight}px` } : {}"
4749
>
4850
<template #key="slotProps">
49-
<slot
50-
name="nodeKey"
51-
:node="slotProps.node"
52-
:defaultKey="slotProps.defaultKey"
53-
/>
51+
<slot name="nodeKey" :node="slotProps.node" :defaultKey="slotProps.defaultKey" />
5452
</template>
5553

5654
<template #value="slotProps">

0 commit comments

Comments
 (0)