All components now use typescript

This commit is contained in:
Chocobozzz
2018-12-21 17:10:39 +01:00
parent b409a5583d
commit b1aa589bc7
30 changed files with 1347 additions and 2247 deletions

View File

@@ -24,29 +24,28 @@
</div>
</template>
<script>
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator';
@Component
export default class Location extends Vue {
@Prop(String) address!: string;
description = 'Paris, France';
center = { lat: 48.85, lng: 2.35 };
markers: any[] = [];
export default {
data() {
return {
description: 'Paris, France',
center: { lat: 48.85, lng: 2.35 },
markers: [],
};
},
props: ['address'],
methods: {
setPlace(place) {
this.center = {
lat: place.geometry.location.lat(),
lng: place.geometry.location.lng(),
};
this.markers = [{
this.markers = [ {
position: { lat: this.center.lat, lng: this.center.lng },
}];
} ];
this.$emit('input', place.formatted_address);
},
},
};
}
};
</script>