2022-03-26 18:53:56 +08:00
|
|
|
import type { InjectionKey, Ref } from 'vue'
|
2022-03-29 15:12:10 +08:00
|
|
|
import type { useNamespace } from '@element-plus/hooks'
|
2022-03-26 18:53:56 +08:00
|
|
|
|
|
|
|
export type TooltipV2Context = {
|
|
|
|
onClose: () => void
|
|
|
|
onDelayOpen: () => void
|
|
|
|
onOpen: () => void
|
|
|
|
contentId: Ref<string>
|
2022-03-27 10:55:03 +08:00
|
|
|
triggerRef: Ref<HTMLElement | null>
|
2022-03-29 15:12:10 +08:00
|
|
|
ns: ReturnType<typeof useNamespace>
|
|
|
|
}
|
|
|
|
|
|
|
|
export type TooltipV2ContentContext = {
|
|
|
|
arrowRef: Ref<HTMLElement | null>
|
2022-03-26 18:53:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export const tooltipV2RootKey: InjectionKey<TooltipV2Context> =
|
|
|
|
Symbol('tooltipV2')
|
|
|
|
|
2022-03-29 15:12:10 +08:00
|
|
|
export const tooltipV2ContentKey: InjectionKey<TooltipV2ContentContext> =
|
|
|
|
Symbol('tooltipV2Content')
|
|
|
|
|
2022-03-26 18:53:56 +08:00
|
|
|
export const TOOLTIP_V2_OPEN = 'tooltip_v2.open'
|