Convert admin page to Vue
This commit is contained in:
44
src/components/project.vue
Normal file
44
src/components/project.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<script>
|
||||
//Leaflet
|
||||
import 'leaflet';
|
||||
import 'leaflet-geometryutil';
|
||||
import 'leaflet.heightgraph';
|
||||
import '../scripts/leaflet.helpers';
|
||||
import { LMap, LTileLayer } from "@vue-leaflet/vue-leaflet";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
LMap,
|
||||
LTileLayer
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
server: this.spot.consts.server,
|
||||
zoom: 13
|
||||
};
|
||||
},
|
||||
inject: ['spot'],
|
||||
mounted() {
|
||||
if(this.$parent.hash.items.length==0) this.$parent.setHash(this.$parent.hash.page, [this.spot.vars('default_project_codename')]);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div id="projects">
|
||||
<div id="background"></div>
|
||||
<div id="submap">
|
||||
<div class="loader fa fa-fw fa-map flicker" id="map_loading"></div>
|
||||
</div>
|
||||
<div id="map">
|
||||
<l-map ref="map" v-model:zoom="zoom" :center="[47.41322, -1.219482]">
|
||||
<l-tile-layer
|
||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
layer-type="base"
|
||||
name="OpenStreetMap"
|
||||
></l-tile-layer>
|
||||
</l-map>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mobile" class="mobile"></div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user