Imported l-control

This commit is contained in:
2021-09-07 15:11:20 +02:00
parent 4c0f2750fd
commit 24eabaec3a
3 changed files with 11 additions and 4 deletions

2
dist/js/field.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -9,7 +9,7 @@
<l-control position="topleft" v-if="edit" class="block my-2"> <l-control position="topleft" v-if="edit" class="block my-2">
<div class="flex"> <div class="flex">
<div v-for="option in routeTypes"> <div v-for="option in routeTypes" class="ml-2">
<input type="radio" :id="option.value" :value="option.value" v-model="selectedRouteType"> <input type="radio" :id="option.value" :value="option.value" v-model="selectedRouteType">
<label :for="option.value">{{ option.name }}</label> <label :for="option.value">{{ option.name }}</label>
</div> </div>
@@ -20,6 +20,8 @@
</template> </template>
<script> <script>
import { LControl } from 'vue2-leaflet';
export default { export default {
props: { props: {
value: { value: {
@@ -51,7 +53,7 @@ export default {
}, },
created() { created() {
this.selectedRouteTypes = this.routeTypes[0]; this.selectedRouteTypes = this.routeTypes[0].value;
if (this.value !== null) { if (this.value !== null) {
this.localValue = this.value; this.localValue = this.value;
@@ -91,5 +93,9 @@ export default {
this.$emit("input", navigationRouteCoords); this.$emit("input", navigationRouteCoords);
}, },
}, },
components: {
LControl
}
}; };
</script> </script>

View File

@@ -44,7 +44,7 @@
</template> </template>
<script> <script>
import { LMarker, LIcon, LPolygon } from "vue2-leaflet"; import { LMarker, LIcon, LPolygon, LControl } from "vue2-leaflet";
export default { export default {
props: { props: {
@@ -144,6 +144,7 @@ export default {
LMarker, LMarker,
LIcon, LIcon,
LPolygon, LPolygon,
LControl,
}, },
}; };
</script> </script>