element-plus/packages/components/dropdown/index.ts
三咲智子 55348b30b6
style: use prettier (#3228)
* style: use prettier

* style: just prettier format, no code changes

* style: eslint fix
object-shorthand, prefer-const

* style: fix no-void

* style: no-console
2021-09-04 19:29:28 +08:00

26 lines
794 B
TypeScript

import Dropdown from './src/dropdown.vue'
import DropdownItem from './src/dropdown-item.vue'
import DropdownMenu from './src/dropdown-menu.vue'
import type { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
Dropdown.install = (app: App): void => {
app.component(Dropdown.name, Dropdown)
app.component(DropdownItem.name, DropdownItem)
app.component(DropdownMenu.name, DropdownMenu)
}
Dropdown.DropdownItem = DropdownItem
Dropdown.DropdownMenu = DropdownMenu
const _Dropdown = Dropdown as any as SFCWithInstall<typeof Dropdown> & {
DropdownItem: typeof DropdownItem
DropdownMenu: typeof DropdownMenu
}
export default _Dropdown
export const ElDropdown = _Dropdown
export const ElDropdownItem = DropdownItem
export const ElDropdownMenu = DropdownMenu