import { ref, watch, watchEffect } from "vue"; import type { PhotoRaw } from "./photos"; import { ui18n } from "@/lang"; export type AccidentPhoto = { id: string; photoUrl: string; title: string; url: string; time: number; data: any; updateTime?: number; type?: string; sceneData: { meterPerPixel: number; fixGraphs: PhotoRaw["fixGraphs"]; measures: PhotoRaw["measures"]; fixPoints: PhotoRaw["fixPoints"]; basePoints: PhotoRaw["basePoints"]; baseLines: PhotoRaw["baseLines"]; }; }; export const types = [ ui18n.t("tl.aptypes[0]"), ui18n.t("tl.aptypes[1]"), ui18n.t("tl.aptypes[2]"), ui18n.t("tl.aptypes[3]"), ]; export const accidentPhotos = ref([]); watch( accidentPhotos, (val) => { console.error(accidentPhotos.value[1]); }, { deep: true, flush: "sync" } );