2021-08-24 13:36:48 +08:00
|
|
|
import Popover from './src/index.vue'
|
|
|
|
import PopoverDirective, { VPopover } from './src/directive'
|
|
|
|
|
|
|
|
import type { App } from 'vue'
|
|
|
|
import type { SFCWithInstall } from '@element-plus/utils/types'
|
|
|
|
|
|
|
|
Popover.install = (app: App): void => {
|
|
|
|
app.component(Popover.name, Popover)
|
|
|
|
}
|
2021-09-04 19:29:28 +08:00
|
|
|
;(PopoverDirective as SFCWithInstall<typeof PopoverDirective>).install = (
|
|
|
|
app: App
|
|
|
|
) => {
|
2021-08-24 13:36:48 +08:00
|
|
|
app.directive(VPopover, PopoverDirective)
|
|
|
|
}
|
|
|
|
|
2021-09-04 19:29:28 +08:00
|
|
|
const _PopoverDirective = PopoverDirective as SFCWithInstall<
|
|
|
|
typeof PopoverDirective
|
|
|
|
>
|
2021-08-24 13:36:48 +08:00
|
|
|
|
|
|
|
Popover.directive = _PopoverDirective
|
|
|
|
|
|
|
|
const _Popover = Popover as any as SFCWithInstall<typeof Popover> & {
|
|
|
|
directive: typeof _PopoverDirective
|
|
|
|
}
|
|
|
|
|
|
|
|
export default _Popover
|
|
|
|
export const ElPopover = _Popover
|
|
|
|
export const ElPopoverDirective = _PopoverDirective
|