Skip to content

Commit 3e1f0cb

Browse files
authored
Merge pull request #92 from Simon-He95/feat/table-style
fix(tableNode): remove body td pl-0
2 parents faa9f3c + 7996da2 commit 3e1f0cb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/TableNode/TableNode.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const colWidths = computed(() => {
4545
const base = Math.floor(100 / n)
4646
// 为了保证总和为100%,最后一个列占剩余的百分比
4747
return Array.from({ length: n }).map((_, i) =>
48-
i === n - 1 ? `${100 - base * (n - 1)}%` : `${base}%`,
48+
i === n - 1 ? `${100 - base * (n - 1)}%` : `${base}%`
4949
)
5050
})
5151
@@ -61,7 +61,7 @@ const bodyRows = computed(() => props.node.rows ?? [])
6161
:aria-busy="isLoading"
6262
>
6363
<colgroup>
64-
<col v-for="(w, i) in colWidths" :key="`col-${i}`" :style="{ width: w }">
64+
<col v-for="(w, i) in colWidths" :key="`col-${i}`" :style="{ width: w }" />
6565
</colgroup>
6666
<thead class="border-[var(--table-border,#cbd5e1)]">
6767
<tr class="border-b">
@@ -90,7 +90,6 @@ const bodyRows = computed(() => props.node.rows ?? [])
9090
v-for="(cell, cellIndex) in row.cells"
9191
:key="`cell-${rowIndex}-${cellIndex}`"
9292
class="text-left truncate p-[calc(4/7*1em)]"
93-
:class="[cellIndex === 0 ? '!pl-0' : '']"
9493
dir="auto"
9594
>
9695
<NodeRenderer

0 commit comments

Comments
 (0)