1 | import { SetupContext } from 'vue'
|
2 | import { VXEComponent, VxeComponentBase } from './component'
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export const VxeIcon: VXEComponent<{ [key: string]: any }>
|
11 |
|
12 |
|
13 |
|
14 | export const Icon: VXEComponent<{ [key: string]: any }>
|
15 |
|
16 | export interface VxeIconConstructor extends VxeComponentBase, VxeIconMethods {
|
17 | props: VxeIconProps
|
18 | context: SetupContext<VxeIconEmits>
|
19 | }
|
20 |
|
21 | export interface IconMethods {}
|
22 |
|
23 | export interface VxeIconMethods extends IconMethods { }
|
24 |
|
25 | export type VxeIconProps<D = any> = {
|
26 | name?: VxeIconPropTypes.Name
|
27 | roll?: VxeIconPropTypes.Roll
|
28 | status?: VxeIconPropTypes.Status
|
29 | }
|
30 |
|
31 | export namespace VxeIconPropTypes {
|
32 | export type Name = string
|
33 | export type Roll = boolean
|
34 | export type Status = string
|
35 | }
|
36 |
|
37 | export type VxeIconEmits = [
|
38 | 'click'
|
39 | ]
|
40 |
|
41 | export namespace VxeIconDefines {
|
42 | interface IconKeyboardEventParams {
|
43 | $event: KeyboardEvent
|
44 | }
|
45 | export interface ClickParams {}
|
46 | export interface ClickEventParams extends IconKeyboardEventParams, ClickParams { }
|
47 | }
|
48 |
|
49 | export type VxeIconEventProps = {
|
50 | onClick?: VxeIconEvents.Click
|
51 | }
|
52 |
|
53 | export interface VxeIconListeners {
|
54 | click?: VxeIconEvents.Click
|
55 | }
|
56 |
|
57 | export namespace VxeIconEvents {
|
58 | export type Click = (params: VxeIconDefines.ClickEventParams) => void
|
59 | }
|