Skip to content

Commit

Permalink
use shallowRef
Browse files Browse the repository at this point in the history
  • Loading branch information
kor3k committed Oct 13, 2024
1 parent 753c19b commit a34ce76
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/vue-mapbox-gl/components/MapboxMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,13 @@
</script>

<script setup>
import { ref, computed, onMounted, onUnmounted, provide } from 'vue';
import { ref, shallowRef, computed, onMounted, onUnmounted, provide } from 'vue';
import { useEventsBinding, usePropsBinding } from '../composables/index.js';
const props = defineProps(propsConfig);
const emit = defineEmits();
const map = ref();
const map = shallowRef();
provide('mapbox-map', map);
const root = ref();
Expand Down
4 changes: 2 additions & 2 deletions packages/vue-mapbox-gl/components/MapboxMarker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@
</script>

<script setup>
import { computed, ref, onMounted, onUnmounted, useSlots } from 'vue';
import { computed, ref, shallowRef, onMounted, onUnmounted, useSlots } from 'vue';
import { useMap, useEventsBinding, usePropsBinding } from '../composables/index.js';
import MapboxPopup from './MapboxPopup.vue';
const props = defineProps(propsConfig);
const emit = defineEmits();
const slots = useSlots();
const marker = ref();
const marker = shallowRef();
const contentRef = ref();
const popupRef = ref();
const hasPopup = computed(() => typeof slots.popup !== 'undefined');
Expand Down
4 changes: 2 additions & 2 deletions packages/vue-mapbox-gl/components/MapboxPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@
</script>

<script setup>
import { ref, computed, onMounted, onUnmounted } from 'vue';
import { ref, shallowRef, computed, onMounted, onUnmounted } from 'vue';
import { useMap, usePropsBinding, useEventsBinding } from '../composables/index.js';
const props = defineProps(propsConfig);
const emit = defineEmits();
const popup = ref();
const popup = shallowRef();
const root = ref();
const options = computed(() => {
const { lngLat, ...options } = props;
Expand Down

0 comments on commit a34ce76

Please sign in to comment.