From 25a97ec5ceeea0329cfd8b63114a43403bb00d15 Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Mon, 17 Aug 2020 13:52:44 +0800 Subject: [PATCH] chore: update type descriptions (#2686) * chore: update type descriptions * fix: object * fix: add pub --- types/descriptions/descriptions-item.d.ts | 25 ++++--- types/descriptions/descriptions.d.ts | 85 ++++++++++++----------- types/pub.ts | 8 +++ 3 files changed, 67 insertions(+), 51 deletions(-) create mode 100644 types/pub.ts diff --git a/types/descriptions/descriptions-item.d.ts b/types/descriptions/descriptions-item.d.ts index 55d0eec28..0794901ce 100644 --- a/types/descriptions/descriptions-item.d.ts +++ b/types/descriptions/descriptions-item.d.ts @@ -2,19 +2,22 @@ // Definitions by: akki-jat // Definitions: https://github.com/vueComponent/ant-design-vue/types +import { VNodeChild } from 'vue'; import { AntdComponent } from '../component'; export declare class DescriptionsItem extends AntdComponent { - /** - * the label of descriptions item - * @type any - */ - label: any; + $props: { + /** + * the label of descriptions item + * @type any + */ + label?: VNodeChild | JSX.Element; - /** - * can be set to small large or omitted - * @default 1 - * @type number - */ - span: number; + /** + * can be set to small large or omitted + * @default 1 + * @type number + */ + span?: number; + }; } diff --git a/types/descriptions/descriptions.d.ts b/types/descriptions/descriptions.d.ts index a970686ad..a58f1a64d 100644 --- a/types/descriptions/descriptions.d.ts +++ b/types/descriptions/descriptions.d.ts @@ -2,56 +2,61 @@ // Definitions by: akki-jat // Definitions: https://github.com/vueComponent/ant-design-vue/types +import { VNodeChild } from 'vue'; import { AntdComponent } from '../component'; import { DescriptionsItem } from './descriptions-item'; +import { Breakpoint } from '../pub'; + export declare class Descriptions extends AntdComponent { static Item: typeof DescriptionsItem; - /** - * descriptions size type - * @default 'default' - * @type string - */ - size: 'default' | 'middle' | 'small'; + $props: { + /** + * descriptions size type + * @default 'default' + * @type string + */ + size?: 'default' | 'middle' | 'small'; - /** - * custom prefixCls - * @type string - */ - prefixCls: string; + /** + * custom prefixCls + * @type string + */ + prefixCls?: string; - /** - * whether descriptions have border - * @default false - * @type boolean - */ - bordered: boolean; + /** + * whether descriptions have border + * @default false + * @type boolean + */ + bordered?: boolean; - /** - * custom title - * @type any - */ - title: any; + /** + * custom title + * @type any + */ + title?: VNodeChild | JSX.Element; - /** - * the number of descriptionsitem in one line - * @default 3 - * @type number | object - */ - column: number | object; + /** + * the number of descriptionsitem in one line + * @default 3 + * @type number | object + */ + column?: number | Partial; - /** - * descriptions layout - * @default 'horizontal' - * @type string - */ - layout: 'horizontal' | 'vertical'; + /** + * descriptions layout + * @default 'horizontal' + * @type string + */ + layout?: 'horizontal' | 'vertical'; - /** - * whether have colon in descriptionsitem - * @default true - * @type boolean - */ - colon: boolean; + /** + * whether have colon in descriptionsitem + * @default true + * @type boolean + */ + colon?: boolean; + }; } diff --git a/types/pub.ts b/types/pub.ts new file mode 100644 index 000000000..99ac1110b --- /dev/null +++ b/types/pub.ts @@ -0,0 +1,8 @@ +export type Breakpoint = { + xs: number; + sm: number; + md: number; + lg: number; + xl: number; + xxl: number; +};