diff --git a/packages/components/table/src/table-body/events-helper.ts b/packages/components/table/src/table-body/events-helper.ts index e87ed068b2..802b34c867 100644 --- a/packages/components/table/src/table-body/events-helper.ts +++ b/packages/components/table/src/table-body/events-helper.ts @@ -2,7 +2,12 @@ import { h, inject, ref } from 'vue' import { debounce } from 'lodash-unified' import { addClass, hasClass, removeClass } from '@element-plus/utils' -import { createTablePopper, getCell, getColumnByCell } from '../util' +import { + createTablePopper, + getCell, + getColumnByCell, + removePopper, +} from '../util' import { TABLE_INJECTION_KEY } from '../tokens' import type { TableColumnCtx } from '../table-column/defaults' import type { TableBodyProps } from './defaults' @@ -156,6 +161,8 @@ function useEvents(props: Partial>) { cell, table ) + } else if (removePopper?.trigger === cell) { + removePopper?.() } } const handleCellMouseLeave = (event) => {