select.d.ts 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. }