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

View File

@ -5,10 +5,12 @@
import { AntdComponent } from '../component'; import { AntdComponent } from '../component';
export declare class CheckableTag extends AntdComponent { export declare class CheckableTag extends AntdComponent {
/** $props: {
* Checked status of Tag /**
* @default false * Checked status of Tag
* @type boolean * @default false
*/ * @type boolean
checked: 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 { export declare class Tag extends AntdComponent {
static CheckableTag: typeof CheckableTag; static CheckableTag: typeof CheckableTag;
/** $props: {
* Callback executed when close animation is completed /**
* @type Function * Callback executed when close animation is completed
*/ * @type Function
afterClose: () => void; */
afterClose?: () => void;
/** /**
* Whether the Tag can be closed * Whether the Tag can be closed
* @default false * @default false
* @type boolean * @type boolean
*/ */
closable: boolean; closable?: boolean;
/** /**
* Color of the Tag * Color of the Tag
* @type string * @type string
*/ */
color: string; color?: string;
/** /**
* Whether the Tag is closed or not * Whether the Tag is closed or not
* @default true * @default true
* @type boolean * @type boolean
*/ */
visible: boolean; visible?: boolean;
};
} }