@alvarosacari/vuetify-google-autocomplete
Version:
A Vuetify ready Vue.jS component to Google Places Autocomplete
1 lines • 974 B
JavaScript
var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};import loadGoogleMaps from'./helper';import VuetifyGoogleAutocomplete from'./VuetifyGoogleAutocomplete';if(typeof window!=='undefined'){window.vgaMapState={initMap:false};window.initVGAMaps=function(){window.vgaMapState.initMap=true}}VuetifyGoogleAutocomplete.install=function(Vue,options){options=_extends({installComponents:true,vueGoogleMapsCompatibility:false},options);Vue.mixin({created:function created(){this.$vueGoogleMapsCompatibility=options.vueGoogleMapsCompatibility}});if(options.apiKey){if(!options.vueGoogleMapsCompatibility){loadGoogleMaps(options.apiKey,options.version,options.language)}}if(options.installComponents){Vue.component(VuetifyGoogleAutocomplete.name,VuetifyGoogleAutocomplete)}};export default VuetifyGoogleAutocomplete;