element-plus/packages/components/popper/index.ts

28 lines
707 B
TypeScript
Raw Normal View History

import Popper from './src/index.vue'
2020-08-18 18:02:28 +08:00
import type { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
2020-08-18 18:02:28 +08:00
Popper.install = (app: App): void => {
2020-08-18 18:02:28 +08:00
app.component(Popper.name, Popper)
}
const _Popper = Popper as SFCWithInstall<typeof Popper>
export default _Popper
export const ElPopper = _Popper
export {
default as popperDefaultProps,
Effect,
} from './src/use-popper/defaults'
export * from './src/renderers'
export { default as usePopper } from './src/use-popper'
export type { Placement, Options } from '@popperjs/core'
export type { EmitType } from './src/use-popper'
export type {
TriggerType,
IPopperOptions,
PopperInstance,
} from './src/use-popper/defaults'