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,
|
columnKey: String,
|
||||||
align: String,
|
align: String,
|
||||||
headerAlign: String,
|
headerAlign: String,
|
||||||
showOverflowTooltip: [Boolean, Object] as PropType<
|
showOverflowTooltip: {
|
||||||
|
type: [Boolean, Object] as PropType<
|
||||||
TableColumnCtx<DefaultRow>['showOverflowTooltip']
|
TableColumnCtx<DefaultRow>['showOverflowTooltip']
|
||||||
>,
|
>,
|
||||||
|
default: undefined,
|
||||||
|
},
|
||||||
fixed: [Boolean, String],
|
fixed: [Boolean, String],
|
||||||
formatter: Function as PropType<TableColumnCtx<DefaultRow>['formatter']>,
|
formatter: Function as PropType<TableColumnCtx<DefaultRow>['formatter']>,
|
||||||
selectable: Function as PropType<TableColumnCtx<DefaultRow>['selectable']>,
|
selectable: Function as PropType<TableColumnCtx<DefaultRow>['selectable']>,
|
||||||
|
@ -11,7 +11,7 @@ import {
|
|||||||
ref,
|
ref,
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import ElCheckbox from '@element-plus/components/checkbox'
|
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 { cellStarts } from '../config'
|
||||||
import { compose, mergeOptions } from '../util'
|
import { compose, mergeOptions } from '../util'
|
||||||
import useWatcher from './watcher-helper'
|
import useWatcher from './watcher-helper'
|
||||||
@ -67,8 +67,9 @@ export default defineComponent({
|
|||||||
|
|
||||||
const type = props.type || 'default'
|
const type = props.type || 'default'
|
||||||
const sortable = props.sortable === '' ? true : props.sortable
|
const sortable = props.sortable === '' ? true : props.sortable
|
||||||
const showOverflowTooltip =
|
const showOverflowTooltip = isUndefined(props.showOverflowTooltip)
|
||||||
props.showOverflowTooltip || parent.props.showOverflowTooltip
|
? parent.props.showOverflowTooltip
|
||||||
|
: props.showOverflowTooltip
|
||||||
const defaults = {
|
const defaults = {
|
||||||
...cellStarts[type],
|
...cellStarts[type],
|
||||||
id: columnId.value,
|
id: columnId.value,
|
||||||
|
Loading…
Reference in New Issue
Block a user