UNPKG

810 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 showTimeoutId: number;
25 constructor(menu: DropListMenu, conf: DropListConf);
26 /**
27 * 显示 DropList
28 */
29 show(): void;
30 /**
31 * 隐藏 DropList
32 */
33 hide(): void;
34 get isShow(): boolean;
35}
36export default DropList;