Ability to customize input in autocomplete
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
[[toc]]
|
||||
|
||||
|
||||
## Load Google maps places
|
||||
Before using Autocomplete, you should load the places library.
|
||||
## Load Google maps places
|
||||
Before using Autocomplete, you should load the places library.
|
||||
|
||||
```vue{5}
|
||||
createApp(App)
|
||||
@@ -20,7 +20,7 @@ createApp(App)
|
||||
|
||||
|
||||
## Add autocomplete to your components
|
||||
You can add autocomplete to your maps using GMapAutocomplete component.
|
||||
You can add autocomplete to your maps using GMapAutocomplete component.
|
||||
```vue
|
||||
<template>
|
||||
<GMapAutocomplete
|
||||
@@ -45,6 +45,37 @@ export default {
|
||||
|
||||
```
|
||||
|
||||
## Custom input for autocomplete
|
||||
You can customize input for autocomplete.
|
||||
```vue
|
||||
<template>
|
||||
<GMapAutocomplete @place_changed="setPlace">
|
||||
<template #input="slotProps">
|
||||
<v-text-field
|
||||
v-bind="slotProps"
|
||||
ref="input"
|
||||
prepend-inner-icon="mdi-map-marker"
|
||||
hide-details
|
||||
/>
|
||||
</template>
|
||||
</GMapAutocomplete>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'App',
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setPlace() {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
```
|
||||
|
||||
## Custom options
|
||||
You can pass google maps auto complete options using options prop
|
||||
|
||||
|
||||
Reference in New Issue
Block a user