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
This commit is contained in:
pengpeng
2025-03-18 10:30:46 +08:00
committed by GitHub
parent 7be4a3765e
commit e9d82e59e9

View File

@@ -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