1 | import { SetupContext, RenderFunction, ComponentPublicInstance } from 'vue'
|
2 | import { VXEComponent, VxeComponentBase, VxeEvent, SizeType, ValueOf } from './component'
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export const VxeRadio: VXEComponent<VxeRadioProps, VxeRadioEventProps, VxeRadioSlots>
|
11 |
|
12 |
|
13 |
|
14 | export const Radio: typeof VxeRadio
|
15 |
|
16 | export type VxeRadioInstance = ComponentPublicInstance<VxeRadioProps, VxeRadioConstructor>
|
17 |
|
18 | export interface VxeRadioConstructor extends VxeComponentBase, VxeRadioMethods {
|
19 | props: VxeRadioProps
|
20 | context: SetupContext<VxeRadioEmits>
|
21 | renderVN: RenderFunction
|
22 | }
|
23 |
|
24 | export type VxeRadioProps = {
|
25 | size?: VxeRadioPropTypes.Size
|
26 | |
27 |
|
28 |
|
29 | strict?: VxeRadioPropTypes.Strict
|
30 | |
31 |
|
32 |
|
33 | modelValue?: VxeRadioPropTypes.ModelValue
|
34 | |
35 |
|
36 |
|
37 | label?: VxeRadioPropTypes.Label
|
38 | |
39 |
|
40 |
|
41 | title?: VxeRadioPropTypes.Title
|
42 | |
43 |
|
44 |
|
45 | content?: VxeRadioPropTypes.Content
|
46 | |
47 |
|
48 |
|
49 | disabled?: VxeRadioPropTypes.Disabled
|
50 | |
51 |
|
52 |
|
53 | name?: VxeRadioPropTypes.Name
|
54 | }
|
55 |
|
56 | export namespace VxeRadioPropTypes {
|
57 | export type Size = SizeType
|
58 | export type Strict = boolean
|
59 | export type ModelValue = any
|
60 | export type Label = any
|
61 | export type Title = string | number
|
62 | export type Content = string | number
|
63 | export type Disabled = boolean
|
64 | export type Name = string
|
65 | }
|
66 |
|
67 | export interface RadioMethods {
|
68 | dispatchEvent(type: ValueOf<VxeRadioEmits>, params: any, evnt: Event): void
|
69 | }
|
70 | export interface VxeRadioMethods extends RadioMethods { }
|
71 |
|
72 | export interface RadioPrivateMethods { }
|
73 | export interface VxeRadioPrivateMethods extends RadioPrivateMethods { }
|
74 |
|
75 | export type VxeRadioEmits = [
|
76 | 'update:modelValue',
|
77 | 'change'
|
78 | ]
|
79 |
|
80 | export namespace VxeRadioDefines {
|
81 | interface RadioEventParams extends VxeEvent {
|
82 | $radio: VxeRadioConstructor
|
83 | }
|
84 |
|
85 | export interface ChangeParams {
|
86 | label: any
|
87 | }
|
88 | export interface ChangeEventParams extends RadioEventParams, ChangeParams { }
|
89 | }
|
90 |
|
91 | export type VxeRadioEventProps = {
|
92 | onChange?: VxeRadioEvents.Change
|
93 | }
|
94 |
|
95 | export interface VxeRadioListeners {
|
96 | change?: VxeRadioEvents.Change
|
97 | }
|
98 |
|
99 | export namespace VxeRadioEvents {
|
100 | export type Change = (params: VxeRadioDefines.ChangeEventParams) => void
|
101 | }
|
102 |
|
103 | export interface VxeRadioSlots {
|
104 | |
105 |
|
106 |
|
107 | [key: string]: ((params: {
|
108 | [key: string]: any
|
109 | }) => any) | undefined
|
110 | }
|