add dropdown component

This commit is contained in:
2023-03-31 17:35:36 +08:00
parent b9447997fe
commit 41b1bbd7d6
20 changed files with 575 additions and 74 deletions

32
lib/ui/dropdown.d.ts vendored Normal file
View File

@ -0,0 +1,32 @@
interface DropdownOptions {
textkey?: string;
valuekey?: string;
htmlkey?: string;
maxlength?: Number;
multiselect?: boolean;
selected?: any;
selectedlist?: any[];
disabled?: boolean;
input?: boolean;
search?: boolean;
searchkeys?: string[];
searchplaceholder?: string;
tabindex?: Number;
slidefixed?: boolean;
parent?: HTMLElement
}
interface Dropdown {
create(): HTMLElement;
get disabled(): boolean;
set disabled(flag: boolean);
readonly multiselect: boolean;
readonly selected: any;
}
declare var Dropdown: {
prototype: Dropdown;
new(options: DropdownOptions): Dropdown;
};
export default Dropdown;