chore: update comment and timeline type (#2701)

pull/2692/head^2
jawn-ha 2020-08-17 19:21:58 +08:00 committed by GitHub
parent 1d8341bbee
commit 17456b68fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 74 additions and 47 deletions

44
types/comment.d.ts vendored
View File

@ -1,19 +1,39 @@
// Project: https://github.com/vueComponent/ant-design-vue
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { VNodeChild } from 'vue';
import { AntdComponent } from './component';
export declare class Comment extends AntdComponent {
/** List of action items rendered below the comment content */
actions?: Array<any>;
/** The element to display as the comment author. */
author?: any;
/** The element to display as the comment avatar - generally an antd Avatar */
avatar?: any;
/** The main content of the comment */
content: any;
/** Comment prefix defaults to '.ant-comment' */
prefixCls?: string;
/** A datetime element containing the time to be displayed */
datetime?: any;
$props: {
/** List of action items rendered below the comment content
* any ( array | slot )
*/
actions?: VNodeChild | JSX.Element;
/** The element to display as the comment author
* @type any ( string | slot)
*/
author?: VNodeChild | JSX.Element;
/** The element to display as the comment avatar - generally an antd Avatar
* @type any ( string | slot)
*/
avatar?: VNodeChild | JSX.Element;
/** The main content of the comment
* @type any ( string | slot)
*/
content?: VNodeChild | JSX.Element;
/** Comment prefix defaults to '.ant-comment'
* @type string
*/
prefixCls?: string;
/** A datetime element containing the time to be displayed
* @type any ( string | slot)
*/
datetime?: VNodeChild | JSX.Element;
}
}

View File

@ -2,19 +2,23 @@
// Definitions by: akki-jat <https://github.com/akki-jat>
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { VNodeChild } from 'vue';
import { AntdComponent } from '../component';
export declare class TimelineItem extends AntdComponent {
/**
* Set the circle's color to blue, red, green or other custom colors
* @default 'blue'
* @type string
*/
color: string;
$props:{
/**
* Set the circle's color to blue, red, green or other custom colors
* @default 'blue'
* @type string
*/
color?: string;
/**
* Customize timeline dot
* @type any (string | slot)
*/
dot: any;
/**
* Customize timeline dot
* @type any (string | slot)
*/
dot?: VNodeChild | JSX.Element;
}
}

View File

@ -2,37 +2,40 @@
// Definitions by: akki-jat <https://github.com/akki-jat>
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { VNodeChild } from 'vue';
import { AntdComponent } from '../component';
import { TimelineItem } from './timeline-item';
export declare class Timeline extends AntdComponent {
static Item: typeof TimelineItem;
/**
* Set the last ghost node's existence or its content
* @default false
* @type any (boolean | string | slot)
*/
pending: any;
$props:{
/**
* Set the last ghost node's existence or its content
* @default false
* @type any (boolean | string | slot)
*/
pending?: boolean | VNodeChild | JSX.Element;
/**
* Set the dot of the last ghost node when pending is true
* @default <LoadingOutlined />
* @type any (string | slot)
*/
pendingDot: any;
/**
* Set the dot of the last ghost node when pending is true
* @default <LoadingOutlined />
* @type any (string | slot)
*/
pendingDot?: VNodeChild | JSX.Element;
/**
* reverse nodes or not
* @default false
* @type boolean
*/
reverse: boolean;
/**
* reverse nodes or not
* @default false
* @type boolean
*/
reverse?: boolean;
/**
* By sending alternate the timeline will distribute the nodes to the left and right.
* @default 'left'
* @type string
*/
mode: 'left' | 'alternate' | 'right';
/**
* By sending alternate the timeline will distribute the nodes to the left and right.
* @default 'left'
* @type string
*/
mode?: 'left' | 'alternate' | 'right';
}
}