Skip to content

Commit

Permalink
Merge pull request #2634 from k344730721/master
Browse files Browse the repository at this point in the history
fix: 自适应列宽,当vxe-cell首个节点为text节点时,宽度获取不当; 应该使用 firstElementChild 来获取宽度;
  • Loading branch information
xuliangzhan authored Nov 13, 2024
2 parents 01db6d8 + bbd48d5 commit 1b21ea8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/table/src/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ export default defineComponent({
titleWidth += (btnEl as HTMLElement).offsetWidth + 1
})
} else {
const labelEl = cellEl.firstChild as HTMLElement
const labelEl = cellEl.firstElementChild as HTMLElement
if (labelEl) {
titleWidth = labelEl.offsetWidth
}
Expand Down

0 comments on commit 1b21ea8

Please sign in to comment.