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: {

152
types/carousel.d.ts vendored
View File

@ -51,83 +51,85 @@ export interface ResponsiveObject {
settings: 'unslick' | Settings; settings: 'unslick' | Settings;
} }
export declare class Carousel extends AntdComponent { export declare class Carousel extends AntdComponent {
accessibility?: boolean; $props: {
adaptiveHeight?: boolean; accessibility?: boolean;
arrows?: boolean; adaptiveHeight?: boolean;
autoplaySpeed?: number; arrows?: boolean;
/** autoplaySpeed?: number;
* Whether to scroll automatically /**
* @default false * Whether to scroll automatically
* @type boolean * @default false
*/ * @type boolean
autoplay?: boolean; */
centerMode?: boolean; autoplay?: boolean;
centerPadding?: string; centerMode?: boolean;
cssEase?: string; centerPadding?: string;
dotsClass?: string; cssEase?: string;
/** dotsClass?: string;
* Whether to show the dots at the bottom of the gallery /**
* @default true * Whether to show the dots at the bottom of the gallery
* @type boolean * @default true
*/ * @type boolean
dots?: boolean; */
draggable?: boolean; dots?: boolean;
/** draggable?: boolean;
* Transition interpolation function name /**
* @default 'linear' * Transition interpolation function name
* @type string * @default 'linear'
*/ * @type string
easing?: string; */
edgeFriction?: number; easing?: string;
fade?: boolean; edgeFriction?: number;
focusOnSelect?: boolean; fade?: boolean;
infinite?: boolean; focusOnSelect?: boolean;
initialSlide?: number; infinite?: boolean;
pauseOnDotsHover?: boolean; initialSlide?: number;
pauseOnFocus?: boolean; pauseOnDotsHover?: boolean;
pauseOnHover?: boolean; pauseOnFocus?: boolean;
responsive?: ResponsiveObject[] | undefined; pauseOnHover?: boolean;
rows?: number; responsive?: ResponsiveObject[] | undefined;
rtl?: boolean; rows?: number;
slide?: string; rtl?: boolean;
slidesPerRow?: number; slide?: string;
slidesToScroll?: number; slidesPerRow?: number;
slidesToShow?: number; slidesToScroll?: number;
speed?: number; slidesToShow?: number;
swipeToSlide?: boolean; speed?: number;
swipe?: boolean; swipeToSlide?: boolean;
touchMove?: boolean; swipe?: boolean;
touchThreshold?: number; touchMove?: boolean;
useCSS?: boolean; touchThreshold?: number;
useTransform?: boolean; useCSS?: boolean;
variableWidth?: boolean; useTransform?: boolean;
/** variableWidth?: boolean;
* Whether to use a vertical display /**
* @default false * Whether to use a vertical display
* @type boolean * @default false
*/ * @type boolean
vertical?: boolean; */
verticalSwiping?: boolean; vertical?: boolean;
waitForAnimate?: boolean; verticalSwiping?: boolean;
dotPosition?: DotPosition; waitForAnimate?: boolean;
/** dotPosition?: DotPosition;
* Callback function called after the current index changes /**
* @type Function * 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 * 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