mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-04 04:58:16 +08:00
chore: update type tabs (#2740)
This commit is contained in:
parent
8694abf14b
commit
32bedc9a9d
35
types/tabs/tab-pane.d.ts
vendored
35
types/tabs/tab-pane.d.ts
vendored
@ -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 {
|
||||
/**
|
||||
* Forced render of content in tabs, not lazy render after clicking on tabs
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
forceRender: boolean;
|
||||
$props: {
|
||||
/**
|
||||
* Forced render of content in tabs, not lazy render after clicking on tabs
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
forceRender?: boolean;
|
||||
|
||||
/**
|
||||
* TabPane's key
|
||||
* @type string
|
||||
*/
|
||||
key: string;
|
||||
/**
|
||||
* TabPane's key
|
||||
* @type string
|
||||
*/
|
||||
key?: string;
|
||||
|
||||
/**
|
||||
* Show text in TabPane's head
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
tab: any;
|
||||
/**
|
||||
* Show text in TabPane's head
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
tab?: VNodeChild | JSX.Element;
|
||||
}
|
||||
}
|
||||
|
114
types/tabs/tabs.d.ts
vendored
114
types/tabs/tabs.d.ts
vendored
@ -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;
|
||||
|
||||
/**
|
||||
* Current TabPane's key
|
||||
* @type 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 };
|
||||
|
||||
/**
|
||||
* 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 };
|
||||
/**
|
||||
* Initial active TabPane's key, if activeKey is not set.
|
||||
* @type string
|
||||
*/
|
||||
defaultActiveKey?: string;
|
||||
|
||||
/**
|
||||
* Initial active TabPane's key, if activeKey is not set.
|
||||
* @type string
|
||||
*/
|
||||
defaultActiveKey: string;
|
||||
/**
|
||||
* Hide plus icon or not. Only works while type="editable-card"
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
hideAdd?: boolean;
|
||||
|
||||
/**
|
||||
* Hide plus icon or not. Only works while type="editable-card"
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
hideAdd: boolean;
|
||||
/**
|
||||
* preset tab bar size
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size?: 'default' | 'small' | 'large';
|
||||
|
||||
/**
|
||||
* preset tab bar size
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size: 'default' | 'small' | 'large';
|
||||
/**
|
||||
* Extra content in tab bar
|
||||
* @type any
|
||||
*/
|
||||
tabBarExtraContent?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Extra content in tab bar
|
||||
* @type any
|
||||
*/
|
||||
tabBarExtraContent: any;
|
||||
/**
|
||||
* Tab bar style object
|
||||
* @type object
|
||||
*/
|
||||
tabBarStyle?: CSSProperties;
|
||||
|
||||
/**
|
||||
* Tab bar style object
|
||||
* @type object
|
||||
*/
|
||||
tabBarStyle: object;
|
||||
/**
|
||||
* Position of tabs
|
||||
* @default 'top'
|
||||
* @type string
|
||||
*/
|
||||
tabPosition?: 'top' | 'right' | 'bottom' | 'left';
|
||||
|
||||
/**
|
||||
* Position of tabs
|
||||
* @default 'top'
|
||||
* @type string
|
||||
*/
|
||||
tabPosition: 'top' | 'right' | 'bottom' | 'left';
|
||||
/**
|
||||
* Basic style of tabs
|
||||
* @default 'line'
|
||||
* @type string
|
||||
*/
|
||||
type?: 'line' | 'card' | 'editable-card';
|
||||
|
||||
/**
|
||||
* Basic style of tabs
|
||||
* @default 'line'
|
||||
* @type string
|
||||
*/
|
||||
type: 'line' | 'card' | 'editable-card';
|
||||
|
||||
/**
|
||||
* The gap between tabs
|
||||
* @type number
|
||||
*/
|
||||
tabBarGutter: number;
|
||||
/**
|
||||
* The gap between tabs
|
||||
* @type number
|
||||
*/
|
||||
tabBarGutter?: number;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user