-
Notifications
You must be signed in to change notification settings - Fork 138
/
index.ts
56 lines (47 loc) 路 1.47 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* @license
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/IDuxFE/idux/blob/main/LICENSE
*/
import type { App, Directive } from 'vue'
import { IxProForm } from '@idux/pro/form'
import { IxProLayout, IxProLayoutSiderTrigger } from '@idux/pro/layout'
import { IxProSearch, IxProSearchShortcut } from '@idux/pro/search'
import { IxProTable, IxProTableLayoutTool } from '@idux/pro/table'
import { IxProTextarea } from '@idux/pro/textarea'
import { IxProTransfer } from '@idux/pro/transfer'
import { IxProTree } from '@idux/pro/tree'
import { version } from '@idux/pro/version'
const directives: Record<string, Directive> = {}
const components = [
IxProForm,
IxProLayout,
IxProLayoutSiderTrigger,
IxProTable,
IxProTableLayoutTool,
IxProTransfer,
IxProTree,
IxProTextarea,
IxProSearch,
IxProSearchShortcut,
]
const install = (app: App): void => {
components.forEach(component => {
app.component(component.name ?? component.displayName, component)
})
Object.keys(directives).forEach(key => {
app.directive(key, directives[key])
})
}
const installer = { install, version }
export default installer
export { install }
export * from '@idux/pro/form'
export * from '@idux/pro/layout'
export * from '@idux/pro/search'
export * from '@idux/pro/table'
export * from '@idux/pro/textarea'
export * from '@idux/pro/transfer'
export * from '@idux/pro/tree'
export * from '@idux/pro/version'