mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-04 04:58:16 +08:00
chore: update type dropdown (#2721)
This commit is contained in:
parent
6681b50892
commit
e3c38b68f8
87
types/dropdown/dropdown-button.d.ts
vendored
87
types/dropdown/dropdown-button.d.ts
vendored
@ -4,53 +4,58 @@
|
||||
|
||||
import { AntdComponent } from '../component';
|
||||
import { Menu } from '../menu/menu';
|
||||
import { VNodeChild } from 'vue';
|
||||
|
||||
export declare class DropdownButton extends AntdComponent {
|
||||
/**
|
||||
* whether the dropdown menu is disabled
|
||||
* @type boolean
|
||||
*/
|
||||
disabled: boolean;
|
||||
$props: {
|
||||
/**
|
||||
* whether the dropdown menu is disabled
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* the dropdown menu
|
||||
* @type () => Menu
|
||||
*/
|
||||
overlay: any;
|
||||
/**
|
||||
* the dropdown menu
|
||||
* @type () => Menu
|
||||
*/
|
||||
overlay?: () => Menu
|
||||
|
||||
/**
|
||||
* placement of pop menu: bottomLeft bottomCenter bottomRight topLeft topCenter topRight
|
||||
* @default 'bottomLeft'
|
||||
* @type string
|
||||
*/
|
||||
placement: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
||||
/**
|
||||
* placement of pop menu: bottomLeft bottomCenter bottomRight topLeft topCenter topRight
|
||||
* @default 'bottomLeft'
|
||||
* @type string
|
||||
*/
|
||||
placement?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
||||
|
||||
/**
|
||||
* size of the button, the same as Button
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size: 'small' | 'large' | 'default';
|
||||
/**
|
||||
* size of the button, the same as Button
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size?: 'small' | 'large' | 'default';
|
||||
|
||||
/**
|
||||
* the trigger mode which executes the drop-down action
|
||||
* @default ['hover']
|
||||
* @type string[]
|
||||
*/
|
||||
trigger: Array<'click' | 'hover' | 'contextmenu'>;
|
||||
/**
|
||||
* the trigger mode which executes the drop-down action
|
||||
* @default ['hover']
|
||||
* @type string[]
|
||||
*/
|
||||
trigger?: Array<'click' | 'hover' | 'contextmenu'>;
|
||||
|
||||
/**
|
||||
* type of the button, the same as Button
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
type: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default';
|
||||
/**
|
||||
* type of the button, the same as Button
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
type?: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default';
|
||||
|
||||
/**
|
||||
* whether the dropdown menu is visible
|
||||
* @type boolean
|
||||
*/
|
||||
visible: boolean;
|
||||
icon: any;
|
||||
title: string;
|
||||
/**
|
||||
* whether the dropdown menu is visible
|
||||
* @type boolean
|
||||
*/
|
||||
visible?: boolean;
|
||||
/**
|
||||
* Icon (appears on the right) (1.5.0)
|
||||
*/
|
||||
icon?: VNodeChild | JSX.Element;
|
||||
}
|
||||
}
|
||||
|
90
types/dropdown/dropdown.d.ts
vendored
90
types/dropdown/dropdown.d.ts
vendored
@ -5,58 +5,60 @@
|
||||
import { AntdComponent } from '../component';
|
||||
import { Menu } from '../menu/menu';
|
||||
import { DropdownButton } from './dropdown-button';
|
||||
import { CSSProperties } from 'vue';
|
||||
|
||||
export declare class Dropdown extends AntdComponent {
|
||||
static Button: typeof DropdownButton;
|
||||
$props: {
|
||||
/**
|
||||
* the trigger mode which executes the drop-down action
|
||||
* @default ['hover']
|
||||
* @type string[]
|
||||
*/
|
||||
trigger?: Array<'click' | 'hover' | 'contextmenu'>;
|
||||
|
||||
/**
|
||||
* the trigger mode which executes the drop-down action
|
||||
* @default ['hover']
|
||||
* @type string[]
|
||||
*/
|
||||
trigger: Array<'click' | 'hover' | 'contextmenu'>;
|
||||
/**
|
||||
* the dropdown menu
|
||||
* @type () => Menu
|
||||
*/
|
||||
overlay?: () => Menu
|
||||
|
||||
/**
|
||||
* the dropdown menu
|
||||
* @type () => Menu
|
||||
*/
|
||||
overlay: any;
|
||||
/**
|
||||
* Class name of the dropdown root element
|
||||
* @type string
|
||||
*/
|
||||
overlayClassName?: string;
|
||||
|
||||
/**
|
||||
* Class name of the dropdown root element
|
||||
* @type string
|
||||
*/
|
||||
overlayClassName: string;
|
||||
/**
|
||||
* Style of the dropdown root element
|
||||
* @type object
|
||||
*/
|
||||
overlayStyle?: CSSProperties;
|
||||
|
||||
/**
|
||||
* Style of the dropdown root element
|
||||
* @type object
|
||||
*/
|
||||
overlayStyle: object;
|
||||
/**
|
||||
* whether the dropdown menu is visible
|
||||
* @type boolean
|
||||
*/
|
||||
visible?: boolean;
|
||||
|
||||
/**
|
||||
* whether the dropdown menu is visible
|
||||
* @type boolean
|
||||
*/
|
||||
visible: boolean;
|
||||
/**
|
||||
* whether the dropdown menu is disabled
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* whether the dropdown menu is disabled
|
||||
* @type boolean
|
||||
*/
|
||||
disabled: boolean;
|
||||
/**
|
||||
* to set the ontainer of the dropdown menu. The default is to create a div element in body, you can reset it to the scrolling area and make a relative reposition.
|
||||
* @default () => document.body
|
||||
* @type Function
|
||||
*/
|
||||
getPopupContainer?: (triggerNode?: any) => HTMLElement;
|
||||
|
||||
/**
|
||||
* to set the ontainer of the dropdown menu. The default is to create a div element in body, you can reset it to the scrolling area and make a relative reposition.
|
||||
* @default () => document.body
|
||||
* @type Function
|
||||
*/
|
||||
getPopupContainer: (triggerNode?: any) => HTMLElement;
|
||||
|
||||
/**
|
||||
* placement of pop menu: bottomLeft bottomCenter bottomRight topLeft topCenter topRight
|
||||
* @default 'bottomLeft'
|
||||
* @type string
|
||||
*/
|
||||
placement: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
||||
/**
|
||||
* placement of pop menu: bottomLeft bottomCenter bottomRight topLeft topCenter topRight
|
||||
* @default 'bottomLeft'
|
||||
* @type string
|
||||
*/
|
||||
placement?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user