mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
22 lines
646 B
TypeScript
22 lines
646 B
TypeScript
import type { Arrayable } from '../utils/typescript'
|
|
import type { InjectionKey, Ref } from 'vue'
|
|
import type { TooltipTriggerType } from '@element-plus/components/tooltip'
|
|
|
|
export type ElTooltipInjectionContext = {
|
|
controlled: Ref<boolean>
|
|
id: Ref<string>
|
|
open: Ref<boolean>
|
|
trigger: Ref<Arrayable<TooltipTriggerType>>
|
|
onOpen: (e?: Event) => void
|
|
onClose: (e?: Event) => void
|
|
onToggle: (e: Event) => void
|
|
onShow: () => void
|
|
onHide: () => void
|
|
onBeforeShow: () => void
|
|
onBeforeHide: () => void
|
|
updatePopper: () => void
|
|
}
|
|
|
|
export const TOOLTIP_INJECTION_KEY: InjectionKey<ElTooltipInjectionContext> =
|
|
Symbol('elTooltip')
|