UNPKG

1.42 kBTypeScriptView Raw
1import { ElementUIComponent, ElementUIComponentSize } from './component'
2
3/** Trigger mode of expanding current item */
4export type ExpandTrigger = 'click' | 'hover'
5
6/** Cascader Option */
7export interface CascaderOption {
8 label: string,
9 value: any,
10 children: CascaderOption[],
11 disabled: boolean
12}
13
14/** Cascader Component */
15export declare class ElCascader extends ElementUIComponent {
16 /** Data of the options */
17 options: CascaderOption[]
18
19 /** Configuration options */
20 props: object
21
22 /** Selected value */
23 value: any[]
24
25 /** Custom class name for Cascader's dropdown */
26 popperClass: string
27
28 /** Input placeholder */
29 placeholder: string
30
31 /** Whether Cascader is disabled */
32 disabled: boolean
33
34 /** Whether selected value can be cleared */
35 clearable: boolean
36
37 /** Trigger mode of expanding current item */
38 expandTrigger: ExpandTrigger
39
40 /** Whether to display all levels of the selected value in the input */
41 showAllLevels: boolean
42
43 /** Whether the options can be searched */
44 filterable: boolean
45
46 /** Debounce delay when typing filter keyword, in millisecond */
47 debounce: number
48
49 /** Whether selecting an option of any level is permitted */
50 changeOnSelect: boolean
51
52 /** Size of Input */
53 size: ElementUIComponentSize
54
55 /** Hook function before filtering with the value to be filtered as its parameter */
56 beforeFilter: (value: string) => boolean | Promise<any>
57}