Skip to content

Commit

Permalink
feat: ✨add indent
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyjone committed Apr 21, 2023
1 parent a2a4924 commit 33928f6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/column/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
class="cell"
:style="{ lineHeight: `${rowHeight}px`, height: `${rowHeight}px` }"
>
<div class="level-block" :style="{ width: `${data!.level * 20}px` }" />

<div
v-if="props.__index === 0 && !!data?.children?.length"
:class="['expand-icon', { 'expand-icon__expanded': data?.isExpand }]"
Expand Down Expand Up @@ -38,6 +40,12 @@
</svg>
</div>

<div
v-else
class="expand-icon"
:style="{ width: `${rowHeight / 2}px` }"
/>

<slot v-if="slots.default" v-bind="props.data?.data" />

<template v-else-if="props.prop">{{
Expand Down Expand Up @@ -117,6 +125,10 @@ const realWidth = computed(() => {
.expand-icon__expanded {
transform: rotate(90deg);
}
.level-block {
display: inline-block;
}
}
}
</style>

0 comments on commit 33928f6

Please sign in to comment.