Files
element-plus/packages/components/popper/src/trigger.ts
dopamine 7be4a3765e chore: emits smaller declaration files (#20109)
* Revert "fix(types): packing unexpected types (#19419)"

This reverts commit 13506ffb81.

* Revert "chore: add explicit type annoation (#19352)"

* fix(typescript): borken import paths in declaration files

* chore: emits smaller declaration files
2025-03-18 10:08:44 +08:00

45 lines
1.3 KiB
TypeScript

import { buildProps, definePropType } from '@element-plus/utils'
import type { Measurable } from './constants'
import type Trigger from './trigger.vue'
export const popperTriggerProps = buildProps({
virtualRef: {
type: definePropType<Measurable>(Object),
},
virtualTriggering: Boolean,
onMouseenter: {
type: definePropType<(e: Event) => void>(Function),
},
onMouseleave: {
type: definePropType<(e: Event) => void>(Function),
},
onClick: {
type: definePropType<(e: Event) => void>(Function),
},
onKeydown: {
type: definePropType<(e: Event) => void>(Function),
},
onFocus: {
type: definePropType<(e: Event) => void>(Function),
},
onBlur: {
type: definePropType<(e: Event) => void>(Function),
},
onContextmenu: {
type: definePropType<(e: Event) => void>(Function),
},
id: String,
open: Boolean,
} as const)
export type PopperTriggerProps = typeof popperTriggerProps
export type PopperTriggerInstance = InstanceType<typeof Trigger> & unknown
/** @deprecated use `popperTriggerProps` instead, and it will be deprecated in the next major version */
export const usePopperTriggerProps = popperTriggerProps
/** @deprecated use `PopperTriggerInstance` instead, and it will be deprecated in the next major version */
export type ElPopperArrowTrigger = PopperTriggerInstance