chore: update Carousel, Button type (#2733)

pull/2740/head
言肆 2020-08-20 21:26:45 +08:00 committed by GitHub
parent 796b660e2e
commit 2b557452bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 82 additions and 77 deletions

View File

@ -2,7 +2,9 @@
// Definitions by: akki-jat <https://github.com/akki-jat>
// Definitions: https://github.com/vueComponent/ant-design-vue/types
export declare class ButtonGroup {
import { AntdComponent } from '../component';
export declare class ButtonGroup extends AntdComponent {
$props: {
/**
* can be set to small large or omitted

View File

@ -4,8 +4,9 @@
import { ButtonGroup } from './button-group';
import { VNodeChild } from 'vue';
import { AntdComponent } from '../component';
export declare class Button {
export declare class Button extends AntdComponent {
static Group: typeof ButtonGroup;
$props: {

8
types/carousel.d.ts vendored
View File

@ -51,6 +51,7 @@ export interface ResponsiveObject {
settings: 'unslick' | Settings;
}
export declare class Carousel extends AntdComponent {
$props: {
accessibility?: boolean;
adaptiveHeight?: boolean;
arrows?: boolean;
@ -114,20 +115,21 @@ export declare class Carousel extends AntdComponent {
* Callback function called after the current index changes
* @type Function
*/
afterChange: (current: number) => any;
afterChange?: (current: number) => void;
/**
* Callback function called before the current index changes
* @type Function
*/
beforeChange: (from: number, to: number) => any;
beforeChange?: (from?: number, to?: number) => void;
/**
* Transition effect
* @default 'scrollx'
* @type string
*/
effect: 'scrollx' | 'fade';
effect?: 'scrollx' | 'fade';
};
/**
* Go to slide index, if dontAnimate=true, it happens without animation