-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
283 lines (275 loc) · 6.28 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
import 'theme/reset.scss'
import 'theme/icon.scss'
import 'theme/common/transition.scss'
import { App } from 'vue'
import alert from './alert'
import aside from './aside'
import autocomplete from './autocomplete'
import autocompleteSuggestions from './autocomplete-suggestions'
import avatar from './avatar'
import backTop from './backtop'
import badge from './badge'
import breadcrumb from './breadcrumb'
import breadcrumbItem from './breadcrumb-item'
import button from './button'
import buttonGroup from './button-group'
import calendar from './calendar'
import card from './card'
import carousel from './carousel'
import carouselItem from './carousel-item'
import checkbox from './checkbox'
import checkboxButton from './checkbox-button'
import checkboxGroup from './checkbox-group'
import code from './code'
import col from './col'
import container from './container'
import collapse from './collapse'
import collapseItem from './collapse-item'
import collapseTransition from './collapse-transition'
import dialog from './dialog'
import divider from './divider'
import drawer from './drawer'
import dropdown from './dropdown'
import dropdownItem from './dropdown-item'
import dropdownMenu from './dropdown-menu'
import { ElementUIOptions } from './ElementUIOptions'
import footer from './footer'
import form from './form'
import formItem from './form-item'
import header from './header'
import icon from './icon'
import input from './input'
import image from './image'
import infiniteScroll from './infinite-scroll'
import link from './link'
import main from './main'
import markdown from './markdown'
import option from './option'
import optionGroup from './option-group'
import pagination from './pagination'
import progress from './progress'
import row from './row'
import radio from './radio'
import radioButton from './radio-button'
import radioGroup from './radio-group'
import rate from './rate'
import scrollbar from './scrollbar'
import select from './select'
import spinner from './spinner'
import step from './step'
import steps from './steps'
import $switch from './switch'
import tag from './tag'
import table from './table'
import tableColumn from './table-column'
import timeline from './timeline'
import timelineItem from './timeline-item'
import transfer from './transfer'
export const Alert = alert
export const Aside = aside
export const Autocomplete = autocomplete
export const AutocompleteSuggestions = autocompleteSuggestions
export const Avatar = avatar
export const BackTop = backTop
export const Badge = badge
export const Breadcrumb = breadcrumb
export const BreadcrumbItem = breadcrumbItem
export const Button = button
export const ButtonGroup = buttonGroup
export const Calendar = calendar
export const Card = card
export const Checkbox = checkbox
export const CheckboxButton = checkboxButton
export const CheckboxGroup = checkboxGroup
export const Code = code
export const Col = col
export const Container = container
export const Collapse = collapse
export const CollapseItem = collapseItem
export const CollapseTransition = collapseTransition
export const Carousel = carousel
export const CarouselItem = carouselItem
export const Dialog = dialog
export const Divider = divider
export const Drawer = drawer
export const Dropdown = dropdown
export const DropdownItem = dropdownItem
export const DropdownMenu = dropdownMenu
export const Footer = footer
export const Form = form
export const FormItem = formItem
export const Header = header
export const Icon = icon
export const Input = input
export const Image = image
export const InfiniteScroll = infiniteScroll
export const Link = link
export const Main = main
export const Markdown = markdown
export const Option = option
export const OptionGroup = optionGroup
export const Pagination = pagination
export const Progress = progress
export const Radio = radio
export const RadioButton = radioButton
export const RadioGroup = radioGroup
export const Rate = rate
export const Row = row
export const Scrollbar = scrollbar
export const Select = select
export const Spinner = spinner
export const Step = step
export const Steps = steps
export const Switch = $switch
export const Tag = tag
export const Table = table
export const TableColumn = tableColumn
export const Timeline = timeline
export const TimelineItem = timelineItem
export const Transfer = transfer
export const directives = [
InfiniteScroll
]
export const components = [
Alert,
Aside,
Autocomplete,
AutocompleteSuggestions,
Avatar,
BackTop,
Badge,
Breadcrumb,
BreadcrumbItem,
Button,
ButtonGroup,
Calendar,
Card,
Carousel,
CarouselItem,
Checkbox,
CheckboxButton,
CheckboxGroup,
Code,
Col,
Collapse,
CollapseItem,
CollapseTransition,
Container,
Dialog,
Divider,
Drawer,
Dropdown,
DropdownItem,
DropdownMenu,
Footer,
Form,
FormItem,
Header,
Icon,
Input,
Image,
Link,
Main,
Markdown,
Option,
OptionGroup,
Pagination,
Progress,
Radio,
RadioButton,
RadioGroup,
Rate,
Row,
Scrollbar,
Select,
Step,
Steps,
Spinner,
Switch,
Tag,
Table,
TableColumn,
Timeline,
TimelineItem,
Transfer,
]
export const install = function (app: App, opts = {}) {
// 判断是否安装
if (install.installed) return
directives.map(item => app.directive(item.name as string, item.directive))
// 遍历注册全局组件
components.map(component => app.component(component.name as string, component))
ElementUIOptions.value = {
...ElementUIOptions.value,
...opts,
}
}
install.installed = false
const win: anyObject = window || {}
export const version = '1.0.9'
export const ZeroUI = {
install,
Alert,
Aside,
Autocomplete,
AutocompleteSuggestions,
Avatar,
BackTop,
Badge,
Breadcrumb,
BreadcrumbItem,
Button,
ButtonGroup,
Calendar,
Card,
Carousel,
CarouselItem,
Checkbox,
CheckboxButton,
CheckboxGroup,
Code,
Col,
Collapse,
CollapseItem,
CollapseTransition,
Container,
Dialog,
Divider,
Drawer,
Dropdown,
DropdownItem,
DropdownMenu,
Footer,
Form,
FormItem,
Header,
Icon,
Input,
Image,
Link,
Main,
Markdown,
Option,
OptionGroup,
Pagination,
Progress,
Radio,
RadioButton,
RadioGroup,
Rate,
Row,
Scrollbar,
Select,
Step,
Steps,
Spinner,
Switch,
Tag,
Table,
TableColumn,
Timeline,
TimelineItem,
Transfer
}
export default ZeroUI
win.ZeroUI = ZeroUI