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

View File

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

8
types/carousel.d.ts vendored
View File

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