NaviMap.vue 811B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <CoverBtn
  3. :center="center"
  4. :width="width"
  5. :height="height"
  6. @click="onShow"
  7. />
  8. <div
  9. v-show="false"
  10. ref="elRef"
  11. v-viewer="{
  12. toolbar: false,
  13. navbar:false,
  14. title:false,
  15. url: 'data-source',
  16. }"
  17. class="images clearfix"
  18. >
  19. <img class="image" :src="image" :data-source="image" />
  20. </div>
  21. </template>
  22. <script setup>
  23. import { computed, onMounted, ref } from 'vue';
  24. import { useModel } from "@zjxpcyc/vue-tiny-store";
  25. import CoverBtn from "./CoverBtn.vue";
  26. const props = defineProps({
  27. center: Array,
  28. // image: String,
  29. })
  30. const elRef = ref()
  31. const width = ref(170)
  32. const height = ref(70)
  33. const [image] = useModel("mapImage");
  34. const onShow = () => {
  35. elRef.value.$viewer.show()
  36. }
  37. </script>
  38. <style lang="less" scoped>
  39. </style>