From e9d82e59e989820a5cc0cdf89d79cc257c349fe8 Mon Sep 17 00:00:00 2001 From: pengpeng <30883395+webvs2@users.noreply.github.com> Date: Tue, 18 Mar 2025 10:30:46 +0800 Subject: [PATCH] fix(components): [table] the selection column conflicts with setting both `showOverflowTooltip` and `align='center'` styles (#20157) * fix(components): [table] type sets showOverflowTooltip centering style problem under `selection` * Update index.ts * Update index.ts --- packages/components/table/src/table-column/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/components/table/src/table-column/index.ts b/packages/components/table/src/table-column/index.ts index a770096776..9ec66a88f0 100644 --- a/packages/components/table/src/table-column/index.ts +++ b/packages/components/table/src/table-column/index.ts @@ -67,9 +67,13 @@ export default defineComponent({ const type = props.type || 'default' const sortable = props.sortable === '' ? true : props.sortable - const showOverflowTooltip = isUndefined(props.showOverflowTooltip) - ? parent.props.showOverflowTooltip - : props.showOverflowTooltip + //The selection column should not be affected by `showOverflowTooltip`. + const showOverflowTooltip = + type === 'selection' + ? false + : isUndefined(props.showOverflowTooltip) + ? parent.props.showOverflowTooltip + : props.showOverflowTooltip const tooltipFormatter = isUndefined(props.tooltipFormatter) ? parent.props.tooltipFormatter : props.tooltipFormatter