diff --git a/components.d.ts b/components.d.ts index 6953697..9207ae2 100644 --- a/components.d.ts +++ b/components.d.ts @@ -44,6 +44,7 @@ declare module '@vue/runtime-core' { ElUpload: typeof import('element-plus/es')['ElUpload'] Header: typeof import('./src/components/header.vue')['default'] InfoWindow: typeof import('./src/components/InfoWindow.vue')['default'] + MyComm: typeof import('./src/components/MyComm.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] Sidebar: typeof import('./src/components/sidebar.vue')['default'] diff --git a/src/utils/hooks.ts b/src/utils/hooks.ts index 3443485..859845e 100644 --- a/src/utils/hooks.ts +++ b/src/utils/hooks.ts @@ -2,20 +2,20 @@ import { computed } from "vue"; export function useVModel(props, propsName, emit) { return computed({ - get: () => { + get() { return new Proxy(props[propsName], { get(target, key, receiver) { return Reflect.get(target, key, receiver); }, - set(target, key, value, receiver) { - emit(`update:${propsName}`, { ...target, [key]: value }); + set(target, key, val) { + emit(`update:${propsName}`, { ...target, [key]: val }); return true; }, }); }, - set: (val) => { + set(val) { emit(`update:${propsName}`, val); }, - }); + }) } \ No newline at end of file diff --git a/src/views/monitoringCenter/deviceLocationMap.vue b/src/views/monitoringCenter/deviceLocationMap.vue index d52d9d9..aeb5273 100644 --- a/src/views/monitoringCenter/deviceLocationMap.vue +++ b/src/views/monitoringCenter/deviceLocationMap.vue @@ -62,9 +62,9 @@ const getLocateRecord = () => { list.forEach((item, index) => { let marker: any = ""; if (index == 0) { - marker = newMap.marker({ icon: startIcon, position: [item.lng, item.lat], zIndex: 13 }); - } else if (index == list.length - 1) { marker = newMap.marker({ icon: endIcon, position: [item.lng, item.lat], zIndex: 13 }); + } else if (index == list.length - 1) { + marker = newMap.marker({ icon: startIcon, position: [item.lng, item.lat], zIndex: 13 }); } else { marker = newMap.marker({ icon: ViaIcon, position: [item.lng, item.lat], zIndex: 12 }); } diff --git a/src/views/synthesizeManage/mapLocation/index.vue b/src/views/synthesizeManage/mapLocation/index.vue index 8c65517..322b9ea 100644 --- a/src/views/synthesizeManage/mapLocation/index.vue +++ b/src/views/synthesizeManage/mapLocation/index.vue @@ -123,9 +123,9 @@ const getLocateRecord = () => { list.forEach((item, index) => { let marker: any = ""; if (index == 0) { - marker = newMap.marker({ icon: startIcon, position: [item.lng, item.lat], zIndex: 13 }); - } else if (index == list.length - 1) { marker = newMap.marker({ icon: endIcon, position: [item.lng, item.lat], zIndex: 13 }); + } else if (index == list.length - 1) { + marker = newMap.marker({ icon: startIcon, position: [item.lng, item.lat], zIndex: 13 }); } else { marker = newMap.marker({ icon: ViaIcon, position: [item.lng, item.lat], zIndex: 12 }); }