Skip to content

Commit 2b55745

Browse files
authored
chore: update Carousel, Button type (#2733)
1 parent 796b660 commit 2b55745

File tree

3 files changed

+82
-77
lines changed

3 files changed

+82
-77
lines changed

types/button/button-group.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
// Definitions by: akki-jat <https://github.com/akki-jat>
33
// Definitions: https://github.com/vueComponent/ant-design-vue/types
44

5-
export declare class ButtonGroup {
5+
import { AntdComponent } from '../component';
6+
7+
export declare class ButtonGroup extends AntdComponent {
68
$props: {
79
/**
810
* can be set to small large or omitted

types/button/button.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
import { ButtonGroup } from './button-group';
66
import { VNodeChild } from 'vue';
7+
import { AntdComponent } from '../component';
78

8-
export declare class Button {
9+
export declare class Button extends AntdComponent {
910
static Group: typeof ButtonGroup;
1011

1112
$props: {

types/carousel.d.ts

Lines changed: 77 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -51,83 +51,85 @@ export interface ResponsiveObject {
5151
settings: 'unslick' | Settings;
5252
}
5353
export declare class Carousel extends AntdComponent {
54-
accessibility?: boolean;
55-
adaptiveHeight?: boolean;
56-
arrows?: boolean;
57-
autoplaySpeed?: number;
58-
/**
59-
* Whether to scroll automatically
60-
* @default false
61-
* @type boolean
62-
*/
63-
autoplay?: boolean;
64-
centerMode?: boolean;
65-
centerPadding?: string;
66-
cssEase?: string;
67-
dotsClass?: string;
68-
/**
69-
* Whether to show the dots at the bottom of the gallery
70-
* @default true
71-
* @type boolean
72-
*/
73-
dots?: boolean;
74-
draggable?: boolean;
75-
/**
76-
* Transition interpolation function name
77-
* @default 'linear'
78-
* @type string
79-
*/
80-
easing?: string;
81-
edgeFriction?: number;
82-
fade?: boolean;
83-
focusOnSelect?: boolean;
84-
infinite?: boolean;
85-
initialSlide?: number;
86-
pauseOnDotsHover?: boolean;
87-
pauseOnFocus?: boolean;
88-
pauseOnHover?: boolean;
89-
responsive?: ResponsiveObject[] | undefined;
90-
rows?: number;
91-
rtl?: boolean;
92-
slide?: string;
93-
slidesPerRow?: number;
94-
slidesToScroll?: number;
95-
slidesToShow?: number;
96-
speed?: number;
97-
swipeToSlide?: boolean;
98-
swipe?: boolean;
99-
touchMove?: boolean;
100-
touchThreshold?: number;
101-
useCSS?: boolean;
102-
useTransform?: boolean;
103-
variableWidth?: boolean;
104-
/**
105-
* Whether to use a vertical display
106-
* @default false
107-
* @type boolean
108-
*/
109-
vertical?: boolean;
110-
verticalSwiping?: boolean;
111-
waitForAnimate?: boolean;
112-
dotPosition?: DotPosition;
113-
/**
114-
* Callback function called after the current index changes
115-
* @type Function
116-
*/
117-
afterChange: (current: number) => any;
54+
$props: {
55+
accessibility?: boolean;
56+
adaptiveHeight?: boolean;
57+
arrows?: boolean;
58+
autoplaySpeed?: number;
59+
/**
60+
* Whether to scroll automatically
61+
* @default false
62+
* @type boolean
63+
*/
64+
autoplay?: boolean;
65+
centerMode?: boolean;
66+
centerPadding?: string;
67+
cssEase?: string;
68+
dotsClass?: string;
69+
/**
70+
* Whether to show the dots at the bottom of the gallery
71+
* @default true
72+
* @type boolean
73+
*/
74+
dots?: boolean;
75+
draggable?: boolean;
76+
/**
77+
* Transition interpolation function name
78+
* @default 'linear'
79+
* @type string
80+
*/
81+
easing?: string;
82+
edgeFriction?: number;
83+
fade?: boolean;
84+
focusOnSelect?: boolean;
85+
infinite?: boolean;
86+
initialSlide?: number;
87+
pauseOnDotsHover?: boolean;
88+
pauseOnFocus?: boolean;
89+
pauseOnHover?: boolean;
90+
responsive?: ResponsiveObject[] | undefined;
91+
rows?: number;
92+
rtl?: boolean;
93+
slide?: string;
94+
slidesPerRow?: number;
95+
slidesToScroll?: number;
96+
slidesToShow?: number;
97+
speed?: number;
98+
swipeToSlide?: boolean;
99+
swipe?: boolean;
100+
touchMove?: boolean;
101+
touchThreshold?: number;
102+
useCSS?: boolean;
103+
useTransform?: boolean;
104+
variableWidth?: boolean;
105+
/**
106+
* Whether to use a vertical display
107+
* @default false
108+
* @type boolean
109+
*/
110+
vertical?: boolean;
111+
verticalSwiping?: boolean;
112+
waitForAnimate?: boolean;
113+
dotPosition?: DotPosition;
114+
/**
115+
* Callback function called after the current index changes
116+
* @type Function
117+
*/
118+
afterChange?: (current: number) => void;
118119

119-
/**
120-
* Callback function called before the current index changes
121-
* @type Function
122-
*/
123-
beforeChange: (from: number, to: number) => any;
120+
/**
121+
* Callback function called before the current index changes
122+
* @type Function
123+
*/
124+
beforeChange?: (from?: number, to?: number) => void;
124125

125-
/**
126-
* Transition effect
127-
* @default 'scrollx'
128-
* @type string
129-
*/
130-
effect: 'scrollx' | 'fade';
126+
/**
127+
* Transition effect
128+
* @default 'scrollx'
129+
* @type string
130+
*/
131+
effect?: 'scrollx' | 'fade';
132+
};
131133

132134
/**
133135
* Go to slide index, if dontAnimate=true, it happens without animation

0 commit comments

Comments
 (0)