popover.d.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import { VNode, VNodeDirective } from 'vue'
  2. import { ElementUIComponent } from './component'
  3. export type PopoverTrigger = 'click' | 'focus' | 'hover' | 'manual'
  4. export type PopoverPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end'
  5. export interface PopoverSlots {
  6. /** Content of popover */
  7. default: VNode[],
  8. /** HTML element that triggers popover */
  9. reference: VNode[]
  10. [key: string]: VNode[]
  11. }
  12. /** Popover directive definition */
  13. export interface ElPopoverDirective extends VNodeDirective {
  14. name: 'popover',
  15. arg: string
  16. }
  17. /** Popover Component */
  18. export declare class ElPopover extends ElementUIComponent {
  19. /** How the popover is triggered */
  20. trigger: PopoverTrigger
  21. /** Popover title */
  22. title: string
  23. /** Popover content, can be replaced with a default slot */
  24. content: string
  25. /** Popover width */
  26. width: string | number
  27. /** Popover placement */
  28. placement: PopoverPlacement
  29. /** Whether Popover is disabled */
  30. disabled: boolean
  31. /** Whether popover is visible */
  32. value: boolean
  33. /** Popover offset */
  34. offset: number
  35. /** Popover transition animation */
  36. transition: string
  37. /** Whether a tooltip arrow is displayed or not. For more info, please refer to Vue-popper */
  38. visibleArrow: boolean
  39. /** Parameters for popper.js */
  40. popperOptions: object
  41. /** Custom class name for popover */
  42. popperClass: string
  43. /** Delay before appearing when trigger is hover, in milliseconds */
  44. openDelay: number
  45. /** Delay before disappearing when trigger is hover, in milliseconds */
  46. closeDelay: number
  47. /** Popover tabindex */
  48. tabindex: number
  49. $slots: PopoverSlots
  50. }