docs(components): [autocomplete] fetch-suggestions revise type (#17181)

* docs(components): [autocomplete] fetch-suggestions revise type 

type: definePropType<AutocompleteFetchSuggestions>([Function, Array])
source code array type

* Update docs/en-US/component/autocomplete.md

---------

Co-authored-by: btea <2356281422@qq.com>
This commit is contained in:
Heising
2024-06-14 10:31:54 +09:00
committed by GitHub
parent 254fe0504c
commit a80ea63700

View File

@@ -66,7 +66,7 @@ autocomplete/custom-loading
| value-key | key name of the input suggestion object for display | ^[string] | value |
| debounce | debounce delay when typing, in milliseconds | ^[number] | 300 |
| placement | placement of the popup menu | ^[enum]`'top' \| 'top- start' \| 'top-end' \| 'bottom' \| 'bottom-start' \| 'bottom-end'` | bottom-start |
| fetch-suggestions | a method to fetch input suggestions. When suggestions are ready, invoke `callback(data:[])` to return them to Autocomplete | ^[Function]`(queryString: string, callback: callbackfn) => void` | — |
| fetch-suggestions | a method to fetch input suggestions. When suggestions are ready, invoke `callback(data:[])` to return them to Autocomplete | ^[Array] / ^[Function]`(queryString: string, callback: callbackfn) => void` | — |
| trigger-on-focus | whether show suggestions when input focus | ^[boolean] | true |
| select-when-unmatched | whether to emit a `select` event on enter when there is no autocomplete match | ^[boolean] | false |
| name | same as `name` in native input | ^[string] | — |