1 | import { SetupContext, RenderFunction, ComponentPublicInstance } from 'vue'
|
2 | import { VXEComponent, VxeComponentBase, SizeType, VxeEvent, ValueOf } from './component'
|
3 | import { VxeButtonPropTypes, VxeButtonProps } from './button'
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export const VxeButtonGroup: VXEComponent<VxeButtonGroupProps, VxeButtonGroupEventProps, VxeButtonGroupSlots>
|
12 |
|
13 |
|
14 |
|
15 | export const ButtonGroup: typeof VxeButtonGroup
|
16 |
|
17 | export type VxeButtonGroupInstance = ComponentPublicInstance<VxeButtonGroupProps, VxeButtonGroupConstructor>
|
18 |
|
19 | export interface VxeButtonGroupConstructor extends VxeComponentBase, VxeButtonGroupMethods {
|
20 | props: VxeButtonGroupProps
|
21 | context: SetupContext<VxeButtonGroupEmits>
|
22 | getComputeMaps(): ButtonPrivateComputed
|
23 | renderVN: RenderFunction
|
24 | }
|
25 |
|
26 | export type VxeButtonGroupProps = {
|
27 | size?: VxeButtonGroupPropTypes.Size
|
28 | options?: VxeButtonGroupPropTypes.Options
|
29 | mode?: VxeButtonGroupPropTypes.Mode
|
30 | status?: VxeButtonGroupPropTypes.Status
|
31 | round?: VxeButtonGroupPropTypes.Round
|
32 | circle?: VxeButtonGroupPropTypes.Circle
|
33 | |
34 |
|
35 |
|
36 | disabled?: VxeButtonGroupPropTypes.Disabled
|
37 | className?: VxeButtonGroupPropTypes.ClassName
|
38 | }
|
39 |
|
40 | export namespace VxeButtonGroupPropTypes {
|
41 | export type Size = SizeType
|
42 | export type Options = VxeButtonProps[]
|
43 | export type Round = boolean
|
44 | export type Circle = boolean
|
45 | export type Disabled = boolean
|
46 | export type Mode = VxeButtonPropTypes.Mode
|
47 | export type Status = VxeButtonPropTypes.Status
|
48 | export type ClassName = string | ((params: { $buttonGroup: VxeButtonGroupConstructor }) => string)
|
49 | }
|
50 |
|
51 | export interface ButtonPrivateComputed {
|
52 | }
|
53 |
|
54 | export interface ButtonGroupMethods {
|
55 | dispatchEvent(type: ValueOf<VxeButtonGroupEmits>, params: any, evnt: Event): void
|
56 | }
|
57 | export interface VxeButtonGroupMethods extends ButtonGroupMethods { }
|
58 |
|
59 | export interface ButtonGroupPrivateMethods {
|
60 | handleClick(params: {
|
61 | name: VxeButtonPropTypes.Name
|
62 | }, evnt: Event): void
|
63 | }
|
64 | export interface VxeButtonGroupPrivateMethods extends ButtonGroupPrivateMethods { }
|
65 |
|
66 | export type VxeButtonGroupEmits = [
|
67 | 'click'
|
68 | ]
|
69 |
|
70 | export namespace VxeButtonGroupDefines {
|
71 | interface ButtonGroupEventParams extends VxeEvent {
|
72 | $buttonGroup: VxeButtonGroupConstructor
|
73 | }
|
74 |
|
75 | export interface ClickEventParams extends ButtonGroupEventParams { }
|
76 | }
|
77 |
|
78 | export type VxeButtonGroupEventProps = {
|
79 | onClick?: VxeButtonGroupEvents.Click
|
80 | }
|
81 |
|
82 | export interface VxeButtonGroupListeners {
|
83 | click?: VxeButtonGroupEvents.Click
|
84 | }
|
85 |
|
86 | export namespace VxeButtonGroupEvents {
|
87 | export type Click = (params: VxeButtonGroupDefines.ClickEventParams) => void
|
88 | }
|
89 |
|
90 | export interface VxeButtonGroupSlots {
|
91 | |
92 |
|
93 |
|
94 | [key: string]: ((params: {
|
95 | [key: string]: any
|
96 | }) => any) | undefined
|
97 | }
|