mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
fix(components): [table] adjust the showOverflowTooltip value logic (#13282)
* fix(components): [table] adjust the showOverflowTooltip value logic * fix: set showOverflowTooltip default value to undefined
This commit is contained in:
parent
1ff22aa97a
commit
74c2448ce4
@ -113,9 +113,12 @@ export default {
|
||||
columnKey: String,
|
||||
align: String,
|
||||
headerAlign: String,
|
||||
showOverflowTooltip: [Boolean, Object] as PropType<
|
||||
TableColumnCtx<DefaultRow>['showOverflowTooltip']
|
||||
>,
|
||||
showOverflowTooltip: {
|
||||
type: [Boolean, Object] as PropType<
|
||||
TableColumnCtx<DefaultRow>['showOverflowTooltip']
|
||||
>,
|
||||
default: undefined,
|
||||
},
|
||||
fixed: [Boolean, String],
|
||||
formatter: Function as PropType<TableColumnCtx<DefaultRow>['formatter']>,
|
||||
selectable: Function as PropType<TableColumnCtx<DefaultRow>['selectable']>,
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
ref,
|
||||
} from 'vue'
|
||||
import ElCheckbox from '@element-plus/components/checkbox'
|
||||
import { isString } from '@element-plus/utils'
|
||||
import { isString, isUndefined } from '@element-plus/utils'
|
||||
import { cellStarts } from '../config'
|
||||
import { compose, mergeOptions } from '../util'
|
||||
import useWatcher from './watcher-helper'
|
||||
@ -67,8 +67,9 @@ export default defineComponent({
|
||||
|
||||
const type = props.type || 'default'
|
||||
const sortable = props.sortable === '' ? true : props.sortable
|
||||
const showOverflowTooltip =
|
||||
props.showOverflowTooltip || parent.props.showOverflowTooltip
|
||||
const showOverflowTooltip = isUndefined(props.showOverflowTooltip)
|
||||
? parent.props.showOverflowTooltip
|
||||
: props.showOverflowTooltip
|
||||
const defaults = {
|
||||
...cellStarts[type],
|
||||
id: columnId.value,
|
||||
|
Loading…
Reference in New Issue
Block a user