chore: update type tabs (#2740)

This commit is contained in:
binhaoCen 2020-08-21 22:12:55 +08:00 committed by GitHub
parent 8694abf14b
commit 32bedc9a9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 77 additions and 72 deletions

View File

@ -3,24 +3,27 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from '../component';
import { VNodeChild } from 'vue';
export declare class TabPane extends AntdComponent {
$props: {
/**
* Forced render of content in tabs, not lazy render after clicking on tabs
* @default false
* @type boolean
*/
forceRender: boolean;
forceRender?: boolean;
/**
* TabPane's key
* @type string
*/
key: string;
key?: string;
/**
* Show text in TabPane's head
* @type any (string | slot)
*/
tab: any;
tab?: VNodeChild | JSX.Element;
}
}

24
types/tabs/tabs.d.ts vendored
View File

@ -4,72 +4,74 @@
import { AntdComponent } from '../component';
import { TabPane } from './tab-pane';
import { CSSProperties, VNodeChild } from 'vue';
export declare class Tabs extends AntdComponent {
static TabPane: typeof TabPane;
$props: {
/**
* Current TabPane's key
* @type string
*/
activeKey: string;
activeKey?: string;
/**
* Whether to change tabs with animation. Only works while tabPosition="top"\|"bottom"
* @default true, false when type="card"
* @type boolean | object
*/
animated: boolean | { inkBar: boolean; tabPane: boolean };
animated?: boolean | { inkBar: boolean; tabPane: boolean };
/**
* Initial active TabPane's key, if activeKey is not set.
* @type string
*/
defaultActiveKey: string;
defaultActiveKey?: string;
/**
* Hide plus icon or not. Only works while type="editable-card"
* @default false
* @type boolean
*/
hideAdd: boolean;
hideAdd?: boolean;
/**
* preset tab bar size
* @default 'default'
* @type string
*/
size: 'default' | 'small' | 'large';
size?: 'default' | 'small' | 'large';
/**
* Extra content in tab bar
* @type any
*/
tabBarExtraContent: any;
tabBarExtraContent?: VNodeChild | JSX.Element;
/**
* Tab bar style object
* @type object
*/
tabBarStyle: object;
tabBarStyle?: CSSProperties;
/**
* Position of tabs
* @default 'top'
* @type string
*/
tabPosition: 'top' | 'right' | 'bottom' | 'left';
tabPosition?: 'top' | 'right' | 'bottom' | 'left';
/**
* Basic style of tabs
* @default 'line'
* @type string
*/
type: 'line' | 'card' | 'editable-card';
type?: 'line' | 'card' | 'editable-card';
/**
* The gap between tabs
* @type number
*/
tabBarGutter: number;
tabBarGutter?: number;
}
}