select.d.ts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. /** @Deprecated in next major version */
  25. autoComplete: string
  26. /** Same as autocomplete in native input */
  27. autocomplete: string
  28. /** The name attribute of select input */
  29. name: string
  30. /** Placeholder */
  31. placeholder: string
  32. /** Whether Select is filterable */
  33. filterable: boolean
  34. /** Whether creating new items is allowed. To use this, filterable must be true */
  35. allowCreate: boolean
  36. /** Custom filter method */
  37. filterMethod: QueryChangeHandler
  38. /** Whether options are loaded from server */
  39. remote: boolean
  40. /** Custom remote search method */
  41. remoteMethod: QueryChangeHandler
  42. /** Whether Select is loading data from server */
  43. loading: boolean
  44. /** Displayed text while loading data from server */
  45. loadingText: string
  46. /** Displayed text when no data matches the filtering query */
  47. noMatchText: string
  48. /** Displayed text when there is no options */
  49. noDataText: string
  50. /** Custom class name for Select's dropdown */
  51. popperClass: string
  52. /** Select first matching option on enter key. Use with filterable or remote */
  53. defaultFirstOption: boolean
  54. /** Whether to append the popper menu to body */
  55. popperAppendToBody: boolean
  56. /**
  57. * Focus the Input component
  58. */
  59. focus (): void
  60. /**
  61. * Blur the Input component, and hide the dropdown
  62. */
  63. blur (): void
  64. }