0👍
put functions into exported object within ‘methods’ object:
module.exports = {
props: {
searchArea: Object
},
data: function() {
return {
latlng: whatever
}
},
methods: {
updateSearchLocation: function(this.latlng) {..... },
initMap: function() {.. call updateSearchLocation() as this.updateSearchLocation(this.latlng) ... },
}
}
Source:stackexchange.com