cascader.d.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import { VNode } from 'vue';
  2. import { ElementUIComponent, ElementUIComponentSize } from './component'
  3. import { CascaderOption, CascaderProps, CascaderNode } from './cascader-panel';
  4. export { CascaderOption, CascaderProps, CascaderNode };
  5. export interface CascaderSlots {
  6. /** Custom label content */
  7. default: VNode[],
  8. /** Empty content when no option matches */
  9. empty: VNode[]
  10. [key: string]: VNode[]
  11. }
  12. /** Cascader Component */
  13. export declare class ElCascader<V = any, D = CascaderOption> extends ElementUIComponent {
  14. /** Data of the options */
  15. options: CascaderOption[]
  16. /** Configuration options */
  17. props: CascaderProps<V, D>
  18. /** Selected value */
  19. value: V | V[]
  20. /** Size of Input */
  21. size: ElementUIComponentSize
  22. /** Input placeholder */
  23. placeholder: string
  24. /** Whether Cascader is disabled */
  25. disabled: boolean
  26. /** Whether selected value can be cleared */
  27. clearable: boolean
  28. /** Whether to display all levels of the selected value in the input */
  29. showAllLevels: boolean
  30. /** Whether to collapse selected tags in multiple selection mode */
  31. collapseTags: boolean
  32. /** Separator of option labels */
  33. separator: string
  34. /** Whether the options can be searched */
  35. filterable: boolean
  36. /** filter method to match options according to input keyword */
  37. filterMethod: (node: CascaderNode<V, D>, keyword: string) => boolean
  38. /** Debounce delay when typing filter keyword, in millisecond */
  39. debounce: number
  40. /** Custom class name for Cascader's dropdown */
  41. popperClass: string
  42. /** Hook function before filtering with the value to be filtered as its parameter */
  43. beforeFilter: (value: string) => boolean | Promise<any>
  44. $slots: CascaderSlots
  45. }