In non-string templates,it is necessary to use h-autocomplete.
You can use dict call the system's global configuration, or by dataspassing data.
You can autocomplete.default set the control's default parameter values through global configuration parameters.
There are three types of data: key,title,object, if the demand for more complex and listen for the change event manual processing.
Use mustMatch parameters.
This method can only choose to use title与object type of data.
Define your own style with custom parameters className.
Through the slot of top and bottom, custom the content.
| Property | Description | Type | Optional | Default |
|---|---|---|---|---|
| disabled | disabled | Boolean | - | false |
| type | The format of the data | String | key, object, title | key |
| option | Configuration items, see the options below for details | Object | - | |
| multiple | Multiple choice | Boolean | - | false |
| mustMatch | Must be the selected item | Boolean | - | true |
| datas | Selected data | Array, Object | - | |
| dict | Use the globally defined dictionary | String | - | - |
| placeholder | Show the default prompt | String | - | Search Input |
| show | Default displayed text, for storing and storing key values, but with the show value | String | - | - |
| emptyContent | No prompt for search value | String | - | No results found |
| config | Using the global configuration method | String | - | - |
| className | Custom className | String | - | |
| autoSelectFirst | Whether to automatically select the first option | Boolean | - | false |
| endInput | Setting special character trigger enter | String | - | |
| showDropdownWhenNoResult | Whether the dropdown list is displayed when there is no data | Boolean | - | true |
| Event | Description | Data |
|---|---|---|
| input | The model value triggers a change | Model corresponding value |
| change | The model value triggers a change | The current data object, as well as the trigger source event: enter, blur, picker, remove, clear |
| Method | Description | Parameters |
|---|---|---|
| hide | Hide the dropdown box | none |
| Property | Description | Type | Optional | Default |
|---|---|---|---|---|
| key | Key field of data | String | - | Global configurationautocomplete.default.key |
| title | The title of the data corresponds to the field | String | - | Global configurationautocomplete.default.title |
| getValue | Define the standard output format through data | Function | - | - |
| minWord | The minimum number of words to start the query | Number | - | 0 |
| loadData | Asynchronous data acquisition method | Function | - | - |
| delay | The delay time for data acquisition, improving performance in milliseconds | Number | - | 100 |