select.d.ts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import { ElementUIComponent, ElementUIComponentSize } from './component'
  2. export interface QueryChangeHandler {
  3. /**
  4. * @param queryString Current value of the text input
  5. */
  6. (queryString: string): void
  7. }
  8. /** Dropdown Select Component */
  9. export declare class ElSelect extends ElementUIComponent {
  10. /** The form input value */
  11. value: any
  12. /** Whether multiple-select is activated */
  13. multiple: boolean
  14. /** Whether Select is disabled */
  15. disabled: boolean
  16. /** Unique identity key name for value, required when value is an object */
  17. valueKey: string
  18. /** Size of Input */
  19. size: ElementUIComponentSize
  20. /** Whether single select can be cleared */
  21. clearable: boolean
  22. /** Maximum number of options user can select when multiple is true. No limit when set to 0 */
  23. multipleLimit: number
  24. /** The name attribute of select input */
  25. name: string
  26. /** Placeholder */
  27. placeholder: string
  28. /** Whether Select is filterable */
  29. filterable: boolean
  30. /** Whether creating new items is allowed. To use this, filterable must be true */
  31. allowCreate: boolean
  32. /** Custom filter method */
  33. filterMethod: QueryChangeHandler
  34. /** Whether options are loaded from server */
  35. remote: boolean
  36. /** Custom remote search method */
  37. remoteMethod: QueryChangeHandler
  38. /** Whether Select is loading data from server */
  39. loading: boolean
  40. /** Displayed text while loading data from server */
  41. loadingText: string
  42. /** Displayed text when no data matches the filtering query */
  43. noMatchText: string
  44. /** Displayed text when there is no options */
  45. noDataText: string
  46. /** Custom class name for Select's dropdown */
  47. popperClass: string
  48. /** Select first matching option on enter key. Use with filterable or remote */
  49. defaultFirstOption: boolean
  50. /**
  51. * Focus the Input component
  52. */
  53. focus (): void
  54. /**
  55. * Blur the Input component, and hide the dropdown
  56. */
  57. blur (): void
  58. }