Skip to content

Commit

Permalink
fix: app.use(comp.vue) type is not compatible (element-plus#1067)
Browse files Browse the repository at this point in the history
  • Loading branch information
XiongAmao authored Dec 23, 2020
1 parent 717db6a commit c9c9e0d
Show file tree
Hide file tree
Showing 74 changed files with 292 additions and 73 deletions.
4 changes: 3 additions & 1 deletion packages/alert/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Alert from './src/index.vue'

Alert.install = (app: App): void => {
app.component(Alert.name, Alert)
}

export default Alert
const _Alert: SFCWithInstall<typeof Alert> = Alert

export default _Alert
5 changes: 4 additions & 1 deletion packages/aside/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Aside from '../container/src/aside.vue'

Aside.install = (app: App): void => {
app.component(Aside.name, Aside)
}

export default Aside
const _Aside: SFCWithInstall<typeof Aside> = Aside

export default _Aside

5 changes: 4 additions & 1 deletion packages/autocomplete/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Autocomplete from './src/index.vue'

Autocomplete.install = (app: App): void => {
app.component(Autocomplete.name, Autocomplete)
}

export default Autocomplete
const _Autocomplete: SFCWithInstall<typeof Autocomplete> = Autocomplete

export default _Autocomplete
5 changes: 4 additions & 1 deletion packages/avatar/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Avatar from './src/index.vue'

Avatar.install = (app: App): void => {
app.component(Avatar.name, Avatar)
}

export default Avatar
const _Avatar: SFCWithInstall<typeof Avatar> = Avatar

export default _Avatar
5 changes: 4 additions & 1 deletion packages/backtop/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Backtop from './src/index.vue'

Backtop.install = (app: App): void => {
app.component(Backtop.name, Backtop)
}

export default Backtop
const _Backtop: SFCWithInstall<typeof Backtop> = Backtop

export default _Backtop
5 changes: 4 additions & 1 deletion packages/badge/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Badge from './src/index.vue'

Badge.install = (app: App): void => {
app.component(Badge.name, Badge)
}

export default Badge
const _Badge: SFCWithInstall<typeof Badge> = Badge

export default _Badge
5 changes: 4 additions & 1 deletion packages/breadcrumb-item/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import BreadcrumbItem from '../breadcrumb/src/item.vue'

BreadcrumbItem.install = (app: App): void => {
app.component(BreadcrumbItem.name, BreadcrumbItem)
}

export default BreadcrumbItem
const _BreadcrumbItem: SFCWithInstall<typeof BreadcrumbItem> = BreadcrumbItem

export default _BreadcrumbItem
5 changes: 4 additions & 1 deletion packages/breadcrumb/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Breadcrumb from './src/index.vue'

Breadcrumb.install = (app: App): void => {
app.component(Breadcrumb.name, Breadcrumb)
}

export default Breadcrumb
const _Breadcrumb: SFCWithInstall<typeof Breadcrumb> = Breadcrumb

export default _Breadcrumb
5 changes: 4 additions & 1 deletion packages/button-group/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import ButtonGroup from '../button/src/button-group.vue'

ButtonGroup.install = (app: App): void => {
app.component(ButtonGroup.name, ButtonGroup)
}

export default ButtonGroup
const _ButtonGroup: SFCWithInstall<typeof ButtonGroup> = ButtonGroup

export default _ButtonGroup
5 changes: 4 additions & 1 deletion packages/button/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Button from './src/button.vue'

Button.install = (app: App): void => {
app.component(Button.name, Button)
}

export default Button
const _Button: SFCWithInstall<typeof Button> = Button

export default _Button
5 changes: 4 additions & 1 deletion packages/calendar/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Calendar from './src/index.vue'

Calendar.install = (app: App): void => {
app.component(Calendar.name, Calendar)
}

export default Calendar
const _Calendar: SFCWithInstall<typeof Calendar> = Calendar

export default _Calendar
5 changes: 4 additions & 1 deletion packages/card/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Card from './src/index.vue'

Card.install = (app: App): void => {
app.component(Card.name, Card)
}

export default Card
const _Card: SFCWithInstall<typeof Card> = Card

export default _Card
5 changes: 4 additions & 1 deletion packages/carousel-item/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import CarouselItem from '../carousel/src/item.vue'

CarouselItem.install = (app: App): void => {
app.component(CarouselItem.name, CarouselItem)
}

export default CarouselItem
const _CarouselItem: SFCWithInstall<typeof CarouselItem> = CarouselItem

export default _CarouselItem
5 changes: 4 additions & 1 deletion packages/carousel/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Carousel from './src/main.vue'

Carousel.install = (app: App): void => {
app.component(Carousel.name, Carousel)
}

export default Carousel
const _Carousel: SFCWithInstall<typeof Carousel> = Carousel

export default _Carousel
5 changes: 4 additions & 1 deletion packages/cascader-panel/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import CascaderPanel from './src/index.vue'


CascaderPanel.install = (app: App): void => {
app.component(CascaderPanel.name, CascaderPanel)
}

export default CascaderPanel
const _CascaderPanel: SFCWithInstall<typeof CascaderPanel> = CascaderPanel

export default _CascaderPanel
export * from './src/types'
export * from './src/config'
5 changes: 4 additions & 1 deletion packages/cascader/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Cascader from './src/index.vue'

Cascader.install = (app: App): void => {
app.component(Cascader.name, Cascader)
}

export default Cascader
const _Cascader: SFCWithInstall<typeof Cascader> = Cascader

export default _Cascader
5 changes: 4 additions & 1 deletion packages/checkbox-button/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import CheckboxButton from '../checkbox/src/checkbox-button.vue'

CheckboxButton.install = (app: App): void => {
app.component(CheckboxButton.name, CheckboxButton)
}

export default CheckboxButton
const _CheckboxButton: SFCWithInstall<typeof CheckboxButton> = CheckboxButton

export default _CheckboxButton
5 changes: 4 additions & 1 deletion packages/checkbox-group/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import CheckboxGroup from '../checkbox/src/checkbox-group.vue'

CheckboxGroup.install = (app: App): void => {
app.component(CheckboxGroup.name, CheckboxGroup)
}

export default CheckboxGroup
const _CheckboxGroup: SFCWithInstall<typeof CheckboxGroup> = CheckboxGroup

export default _CheckboxGroup
5 changes: 4 additions & 1 deletion packages/checkbox/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Checkbox from './src/checkbox.vue'

Checkbox.install = (app: App): void => {
app.component(Checkbox.name, Checkbox)
}

export default Checkbox
const _Checkbox: SFCWithInstall<typeof Checkbox> = Checkbox

export default _Checkbox
5 changes: 4 additions & 1 deletion packages/collapse-item/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import CollapseItem from '../collapse/src/collapse-item.vue'

CollapseItem.install = (app: App): void => {
app.component(CollapseItem.name, CollapseItem)
}

export default CollapseItem
const _CollapseItem: SFCWithInstall<typeof CollapseItem> = CollapseItem

export default _CollapseItem
5 changes: 4 additions & 1 deletion packages/collapse-transition/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import CollapseTransition from '../transition/collapse-transition/index.vue'

CollapseTransition.install = (app: App): void => {
app.component(CollapseTransition.name, CollapseTransition)
}

export default CollapseTransition
const _CollapseTransition: SFCWithInstall<typeof CollapseTransition> = CollapseTransition

export default _CollapseTransition
5 changes: 4 additions & 1 deletion packages/collapse/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Collapse from './src/collapse.vue'

Collapse.install = (app: App): void => {
app.component(Collapse.name, Collapse)
}

export default Collapse
const _Collapse: SFCWithInstall<typeof Collapse> = Collapse

export default _Collapse
5 changes: 4 additions & 1 deletion packages/color-picker/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import ColorPicker from './src/index.vue'

ColorPicker.install = (app: App): void => {
app.component(ColorPicker.name, ColorPicker)
}

export default ColorPicker
const _ColorPicker: SFCWithInstall<typeof ColorPicker> = ColorPicker

export default _ColorPicker
5 changes: 4 additions & 1 deletion packages/container/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Container from './src/container.vue'

Container.install = (app: App): void => {
app.component(Container.name, Container)
}

export default Container
const _Container: SFCWithInstall<typeof Container> = Container

export default _Container
5 changes: 4 additions & 1 deletion packages/dialog/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Dialog from './src/index.vue'

Dialog.install = (app: App): void => {
app.component(Dialog.name, Dialog)
}

export default Dialog
const _Dialog: SFCWithInstall<typeof Dialog> = Dialog

export default _Dialog
export { default as useDialog } from './src/useDialog'
5 changes: 4 additions & 1 deletion packages/divider/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Divider from './src/index.vue'

Divider.install = (app: App): void => {
app.component(Divider.name, Divider)
}

export default Divider
const _Divider: SFCWithInstall<typeof Divider> = Divider

export default _Divider
5 changes: 4 additions & 1 deletion packages/drawer/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Drawer from './src/index.vue'

Drawer.install = (app: App): void => {
app.component(Drawer.name, Drawer)
}

export default Drawer
const _Drawer: SFCWithInstall<typeof Drawer> = Drawer

export default _Drawer
5 changes: 4 additions & 1 deletion packages/dropdown-item/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import DropdownItem from '../dropdown/src/dropdown-item.vue'

DropdownItem.install = (app: App): void => {
app.component(DropdownItem.name, DropdownItem)
}

export default DropdownItem
const _DropdownItem: SFCWithInstall<typeof DropdownItem> = DropdownItem

export default _DropdownItem
5 changes: 4 additions & 1 deletion packages/dropdown-menu/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import DropdownMenu from '../dropdown/src/dropdown-menu.vue'

DropdownMenu.install = (app: App): void => {
app.component(DropdownMenu.name, DropdownMenu)
}

export default DropdownMenu
const _DropdownMenu: SFCWithInstall<typeof DropdownMenu> = DropdownMenu

export default _DropdownMenu
5 changes: 4 additions & 1 deletion packages/dropdown/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
import Dropdown from './src/dropdown.vue'

Dropdown.install = (app: App): void => {
app.component(Dropdown.name, Dropdown)
}

export default Dropdown
const _Dropdown: SFCWithInstall<typeof Dropdown> = Dropdown

export default _Dropdown
Loading

0 comments on commit c9c9e0d

Please sign in to comment.