code refactor

This commit is contained in:
MaysWind
2025-01-05 23:54:35 +08:00
parent ad1eec7d47
commit f56bef40d8
4 changed files with 28 additions and 20 deletions
+4 -2
View File
@@ -32,10 +32,12 @@
<script setup lang="ts">
import { computed, useTemplateRef } from 'vue';
import type MapView from '@/components/common/MapView.vue';
import MapView from '@/components/common/MapView.vue';
import type { MapPosition } from '@/lib/map/base.ts';
type MapViewType = InstanceType<typeof MapView>;
const props = defineProps<{
modelValue?: MapPosition;
show: boolean;
@@ -46,7 +48,7 @@ const emit = defineEmits<{
(e: 'update:show', value: boolean): void
}>();
const map = useTemplateRef<MapView>('map');
const map = useTemplateRef<MapViewType>('map');
const geoLocation = computed<MapPosition | undefined>({
get: () => {