chore: update Affix and Tag type (#2700)

pull/2692/head^2
jawn-ha 2020-08-17 18:15:52 +08:00 committed by GitHub
parent 203e8c6b92
commit 50ae500253
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 45 deletions

36
types/affix.d.ts vendored
View File

@ -5,23 +5,25 @@
import { AntdComponent } from './component';
export declare class Affix extends AntdComponent {
/**
* Pixels to offset from top when calculating position of scroll
* @default 0
* @type number
*/
offsetTop: number;
$props: {
/**
* Pixels to offset from top when calculating position of scroll
* @default 0
* @type number
*/
offsetTop?: number;
/**
* Pixels to offset from bottom when calculating position of scroll
* @type number
*/
offsetBottom: number;
/**
* Pixels to offset from bottom when calculating position of scroll
* @type number
*/
offsetBottom?: number;
/**
* specifies the scrollable area dom node
* @default () => window
* @type Function
*/
target: () => HTMLElement;
/**
* specifies the scrollable area dom node
* @default () => window
* @type Function
*/
target?: () => HTMLElement;
};
}

View File

@ -5,10 +5,12 @@
import { AntdComponent } from '../component';
export declare class CheckableTag extends AntdComponent {
/**
* Checked status of Tag
* @default false
* @type boolean
*/
checked: boolean;
$props: {
/**
* Checked status of Tag
* @default false
* @type boolean
*/
checked?: boolean;
};
}

46
types/tag/tag.d.ts vendored
View File

@ -8,29 +8,31 @@ import { CheckableTag } from './checkable-tag';
export declare class Tag extends AntdComponent {
static CheckableTag: typeof CheckableTag;
/**
* Callback executed when close animation is completed
* @type Function
*/
afterClose: () => void;
$props: {
/**
* Callback executed when close animation is completed
* @type Function
*/
afterClose?: () => void;
/**
* Whether the Tag can be closed
* @default false
* @type boolean
*/
closable: boolean;
/**
* Whether the Tag can be closed
* @default false
* @type boolean
*/
closable?: boolean;
/**
* Color of the Tag
* @type string
*/
color: string;
/**
* Color of the Tag
* @type string
*/
color?: string;
/**
* Whether the Tag is closed or not
* @default true
* @type boolean
*/
visible: boolean;
/**
* Whether the Tag is closed or not
* @default true
* @type boolean
*/
visible?: boolean;
};
}