允许当前位置后不更新输入字段

时间:2019-06-27 10:13:26

标签: vue.js autocomplete

我正在使用vue-google-autocomplete。自动放置正常,但gelocate()未更新输入字段。 https://www.npmjs.com/package/vue-google-autocomplete

/**
* When the location found
* @param {Object} addressData Data of the found location
* @param {Object} placeResultData PlaceResult object
* @param {String} id Input container ID
*/
    getAddressData: function (addressData, placeResultData, id) {
    this.address = addressData;
},

HtML

    <div class="form-group">
        <label>Location</label>
        <vue-google-autocomplete ref="address" id="mapm" classname="span3 location-bg form-control" placeholder="Paris, France" v-on:placechanged="getAddressData"></vue-google-autocomplete>
    </div>

 <a v-on:click="$refs.address.geolocate()">Use My Current Location</a>

0 个答案:

没有答案