chore: update type descriptions (#2686)

* chore: update type descriptions

* fix: object

* fix: add pub
pull/2695/head
xrkffgg 2020-08-17 13:52:44 +08:00 committed by GitHub
parent 61ec4adafa
commit 25a97ec5ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 67 additions and 51 deletions

View File

@ -2,19 +2,22 @@
// 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 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;
};
}

View File

@ -2,56 +2,61 @@
// 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 { 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<Breakpoint>;
/**
* 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;
};
}

8
types/pub.ts Normal file
View File

@ -0,0 +1,8 @@
export type Breakpoint = {
xs: number;
sm: number;
md: number;
lg: number;
xl: number;
xxl: number;
};