select.d.ts 1.7 KB

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