UNPKG

783 BTypeScriptView Raw
1/**
2 * @description 下拉列表 class
3 */
4import { DomElement } from '../../utils/dom-core';
5import DropListMenu from './DropListMenu';
6export declare type DropListItem = {
7 $elem: DomElement;
8 value: string;
9};
10export declare type DropListConf = {
11 title: string;
12 list: DropListItem[];
13 type: string;
14 clickHandler: (value: DropListItem['value']) => void;
15 width: number | 100;
16};
17declare class DropList {
18 private menu;
19 private conf;
20 private $container;
21 private rendered;
22 private _show;
23 hideTimeoutId: number;
24 constructor(menu: DropListMenu, conf: DropListConf);
25 /**
26 * 显示 DropList
27 */
28 show(): void;
29 /**
30 * 隐藏 DropList
31 */
32 hide(): void;
33 get isShow(): boolean;
34}
35export default DropList;