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

42
types/comment.d.ts vendored
View File

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

View File

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