Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/components/TableNode/TableNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const colWidths = computed(() => {
const base = Math.floor(100 / n)
// 为了保证总和为100%,最后一个列占剩余的百分比
return Array.from({ length: n }).map((_, i) =>
i === n - 1 ? `${100 - base * (n - 1)}%` : `${base}%`,
i === n - 1 ? `${100 - base * (n - 1)}%` : `${base}%`
)
})

Expand All @@ -61,7 +61,7 @@ const bodyRows = computed(() => props.node.rows ?? [])
:aria-busy="isLoading"
>
<colgroup>
<col v-for="(w, i) in colWidths" :key="`col-${i}`" :style="{ width: w }">
<col v-for="(w, i) in colWidths" :key="`col-${i}`" :style="{ width: w }" />
</colgroup>
<thead class="border-[var(--table-border,#cbd5e1)]">
<tr class="border-b">
Expand Down Expand Up @@ -90,7 +90,6 @@ const bodyRows = computed(() => props.node.rows ?? [])
v-for="(cell, cellIndex) in row.cells"
:key="`cell-${rowIndex}-${cellIndex}`"
class="text-left truncate p-[calc(4/7*1em)]"
:class="[cellIndex === 0 ? '!pl-0' : '']"
dir="auto"
>
<NodeRenderer
Expand Down
Loading