cascader.d.ts 1.4 KB

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