element/types/popover.d.ts
Jingkun Hua 3b378ad58f Add TypeScript definitions (#3910)
* add typings into package.json

* add typings for global instance api

* add common component definition

* add layout components' definition

* add icons definition

* add component size definition

* add component description

* add button definition

* add radio definition

* add checkbox definition

* add input definitions

* add input-number definition

* add select definition

* add cascader definition

* add switch definition

* add slider definition

* add time picker definition

* add date picker definition

* add upload definition

* add rate definition

* add color picker definition

* add form definition

* add tooltip definition

* add table definition

* rename TextAlignment to Horizontal alignment

* add tag definition

* add progress definition

* add tree definition

* add pagination definition

* add badge definition

* add alert definition

* fix typo

* Loading: add definition

* Message: add definition

* Loading: remove unnecessary declare keyword

* MessageBox: add definition

* Notification: add definition

* Menu: add definition

* Tabs: add definition

* Breadcrumb: add definition

* Dropdown: add definition

* Steps: add definition

* Dialog: add definition

* Popover: add definition

* Card: add definition

* Carousel: add definition

* Collapse: add definition

* Loading: update description

* some $message method params should be optional

* Select: update definition

* DatePicker: update definition
2017-10-17 03:36:12 -05:00

63 lines
1.5 KiB
TypeScript

import { VNode, VNodeDirective } from 'vue'
import { ElementUIComponent } from './component'
export type PopoverTrigger = 'click' | 'focus' | 'hover' | 'manual'
export type PopoverPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end'
export interface PopoverSlots {
/** Content of popover */
default: VNode[],
/** HTML element that triggers popover */
reference: VNode[]
[key: string]: VNode[]
}
/** Popover directive definition */
export interface ElPopoverDirective extends VNodeDirective {
name: 'popover',
arg: string
}
/** Popover Component */
export declare class ElPopover extends ElementUIComponent {
/** How the popover is triggered */
trigger: PopoverTrigger
/** Popover title */
title: string
/** Popover content, can be replaced with a default slot */
content: string
/** Popover width */
width: string | number
/** Popover placement */
placement: PopoverPlacement
/** Whether Popover is disabled */
disabled: boolean
/** Whether popover is visible */
value: boolean
/** Popover offset */
offset: number
/** Popover transition animation */
transition: string
/** Whether a tooltip arrow is displayed or not. For more info, please refer to Vue-popper */
visibleArrow: boolean
/** Parameters for popper.js */
options: object
/** Custom class name for popover */
popperClass: string
$slots: PopoverSlots
}