2019-05-29 15:04:06 +08:00
|
|
|
import { VNode } from 'vue';
|
2017-10-17 16:36:12 +08:00
|
|
|
import { ElementUIComponent, ElementUIComponentSize } from './component'
|
2019-05-29 15:04:06 +08:00
|
|
|
import { CascaderOption, CascaderProps, CascaderNode } from './cascader-panel';
|
2017-10-17 16:36:12 +08:00
|
|
|
|
2019-10-30 17:43:07 +08:00
|
|
|
export { CascaderOption, CascaderProps, CascaderNode };
|
2019-05-29 15:04:06 +08:00
|
|
|
|
|
|
|
export interface CascaderSlots {
|
|
|
|
/** Custom label content */
|
|
|
|
default: VNode[],
|
|
|
|
|
|
|
|
/** Empty content when no option matches */
|
|
|
|
empty: VNode[]
|
|
|
|
|
|
|
|
[key: string]: VNode[]
|
2017-10-17 16:36:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Cascader Component */
|
2019-05-29 15:04:06 +08:00
|
|
|
export declare class ElCascader<V = any, D = CascaderOption> extends ElementUIComponent {
|
2017-10-17 16:36:12 +08:00
|
|
|
/** Data of the options */
|
|
|
|
options: CascaderOption[]
|
|
|
|
|
2017-10-18 18:31:03 +08:00
|
|
|
/** Configuration options */
|
2019-05-29 15:04:06 +08:00
|
|
|
props: CascaderProps<V, D>
|
2017-10-17 16:36:12 +08:00
|
|
|
|
|
|
|
/** Selected value */
|
2019-05-29 15:04:06 +08:00
|
|
|
value: V | V[]
|
2017-10-17 16:36:12 +08:00
|
|
|
|
2019-05-29 15:04:06 +08:00
|
|
|
/** Size of Input */
|
|
|
|
size: ElementUIComponentSize
|
2017-10-17 16:36:12 +08:00
|
|
|
|
|
|
|
/** Input placeholder */
|
|
|
|
placeholder: string
|
|
|
|
|
|
|
|
/** Whether Cascader is disabled */
|
|
|
|
disabled: boolean
|
|
|
|
|
|
|
|
/** Whether selected value can be cleared */
|
|
|
|
clearable: boolean
|
|
|
|
|
|
|
|
/** Whether to display all levels of the selected value in the input */
|
|
|
|
showAllLevels: boolean
|
|
|
|
|
2019-05-29 15:04:06 +08:00
|
|
|
/** Whether to collapse selected tags in multiple selection mode */
|
|
|
|
collapseTags: boolean
|
|
|
|
|
|
|
|
/** Separator of option labels */
|
|
|
|
separator: string
|
|
|
|
|
2017-10-17 16:36:12 +08:00
|
|
|
/** Whether the options can be searched */
|
|
|
|
filterable: boolean
|
|
|
|
|
2019-05-29 15:04:06 +08:00
|
|
|
/** filter method to match options according to input keyword */
|
|
|
|
filterMethod: (node: CascaderNode<V, D>, keyword: string) => boolean
|
|
|
|
|
2017-10-17 16:36:12 +08:00
|
|
|
/** Debounce delay when typing filter keyword, in millisecond */
|
|
|
|
debounce: number
|
|
|
|
|
2019-05-29 15:04:06 +08:00
|
|
|
/** Custom class name for Cascader's dropdown */
|
|
|
|
popperClass: string
|
2017-10-18 18:31:03 +08:00
|
|
|
|
|
|
|
/** Hook function before filtering with the value to be filtered as its parameter */
|
2017-10-20 14:03:34 +08:00
|
|
|
beforeFilter: (value: string) => boolean | Promise<any>
|
2019-05-29 15:04:06 +08:00
|
|
|
|
|
|
|
$slots: CascaderSlots
|
2017-10-17 16:36:12 +08:00
|
|
|
}
|