1 | import { SetupContext, RenderFunction, ComponentPublicInstance } from 'vue'
|
2 | import { VXEComponent, VxeComponentBase, VxeEvent, ValueOf } from './component'
|
3 | import { VxeRadioPropTypes } from './radio'
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export const VxeRadioButton: VXEComponent<VxeRadioButtonProps, VxeRadioButtonEventProps, VxeRadioButtonSlots>
|
12 |
|
13 |
|
14 |
|
15 | export const RadioButton: typeof VxeRadioButton
|
16 |
|
17 | export type VxeRadioButtonInstance = ComponentPublicInstance<VxeRadioButtonProps, VxeRadioButtonConstructor>
|
18 |
|
19 | export interface VxeRadioButtonConstructor extends VxeComponentBase, VxeRadioButtonMethods {
|
20 | props: VxeRadioButtonProps
|
21 | context: SetupContext<VxeRadioButtonEmits>
|
22 | renderVN: RenderFunction
|
23 | }
|
24 |
|
25 | export interface RadioButtonMethods {
|
26 | dispatchEvent(type: ValueOf<VxeRadioButtonEmits>, params: any, evnt: Event): void
|
27 | }
|
28 | export interface VxeRadioButtonMethods extends RadioButtonMethods { }
|
29 |
|
30 | export interface RadioButtonPrivateMethods { }
|
31 | export interface VxeRadioButtonPrivateMethods extends RadioButtonPrivateMethods { }
|
32 |
|
33 | export type VxeRadioButtonEmits = [
|
34 | 'update:modelValue',
|
35 | 'change'
|
36 | ]
|
37 |
|
38 | export type VxeRadioButtonProps = {
|
39 | size?: VxeRadioButtonPropTypes.Size
|
40 | modelValue?: VxeRadioButtonPropTypes.ModelValue
|
41 | |
42 |
|
43 |
|
44 | strict?: VxeRadioButtonPropTypes.Strict
|
45 | label?: VxeRadioButtonPropTypes.Label
|
46 | title?: VxeRadioButtonPropTypes.Title
|
47 | content?: VxeRadioButtonPropTypes.Content
|
48 | disabled?: VxeRadioButtonPropTypes.Disabled
|
49 | }
|
50 |
|
51 | export namespace VxeRadioButtonPropTypes {
|
52 | export type Size = VxeRadioPropTypes.Size
|
53 | export type ModelValue = any
|
54 | export type Strict = boolean
|
55 | export type Label = VxeRadioPropTypes.Label
|
56 | export type Title = string | number
|
57 | export type Content = string | number
|
58 | export type Disabled = boolean
|
59 | }
|
60 |
|
61 | export namespace VxeRadioButtonDefines {
|
62 | interface RadioButtonEventParams extends VxeEvent {
|
63 | $radioButton: VxeRadioButtonConstructor
|
64 | }
|
65 |
|
66 | export interface ChangeParams {
|
67 | label: any
|
68 | }
|
69 | export interface ChangeEventParams extends RadioButtonEventParams, ChangeParams { }
|
70 | }
|
71 |
|
72 | export type VxeRadioButtonEventProps = {
|
73 | onChange?: VxeRadioButtonEvents.Change
|
74 | }
|
75 |
|
76 | export interface VxeRadioButtonListeners {
|
77 | change?: VxeRadioButtonEvents.Change
|
78 | }
|
79 |
|
80 | export namespace VxeRadioButtonEvents {
|
81 | export type Change = (params: VxeRadioButtonDefines.ChangeEventParams) => void
|
82 | }
|
83 |
|
84 | export interface VxeRadioButtonSlots {
|
85 | |
86 |
|
87 |
|
88 | [key: string]: ((params: {
|
89 | [key: string]: any
|
90 | }) => any) | undefined
|
91 | }
|