<input placeholder="Search Box" v-model="origin" type="text">
mounted(){
var input = this.origin;
var searchBox = new google.maps.places.SearchBox(input);
searchBox.addListener('places_changed', function() {
var places = searchBox.getPlaces();
});
},
有什么东西我不见了? 我还在index.html上添加了我的api
<script src="https://maps.googleapis.com/maps/api/js?key=xxx&libraries=places"></script>