element-plus/packages/tokens/tooltip.ts
snowingfox 9cd204712b
refactor(components): [tooltip] switch to script-setup syntax (#9685)
Co-authored-by: holazz <2418184580@qq.com>
Co-authored-by: sxzz <sxzz@sxzz.moe>
2022-09-20 03:31:05 +00:00

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')