vue-geojson-view-ts 1.3.16 → 1.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/MapSearchAddress.vue.d.ts +1 -1
- package/dist/components/MapView.vue.d.ts +64 -0
- package/dist/style.css +1 -1
- package/dist/vue-geojson-view-ts.js +11967 -13279
- package/dist/vue-geojson-view-ts.umd.cjs +49 -65
- package/package.json +1 -1
- package/src/components/MapView.vue +17 -2
package/package.json
CHANGED
|
@@ -655,16 +655,31 @@ export default defineComponent({
|
|
|
655
655
|
// url de la foto
|
|
656
656
|
const fotoId = props.fotoId || "";
|
|
657
657
|
|
|
658
|
+
const formatIsoPreserve = (iso: string): string => {
|
|
659
|
+
const d = new Date(iso);
|
|
660
|
+
if (isNaN(d.getTime())) return iso; // fallback: devolver la cadena original si no es válida
|
|
661
|
+
const pad = (n: number) => n.toString().padStart(2, "0");
|
|
662
|
+
// Usar métodos UTC para evitar que el navegador convierta a la zona local
|
|
663
|
+
const day = pad(d.getUTCDate());
|
|
664
|
+
const month = pad(d.getUTCMonth() + 1);
|
|
665
|
+
const year = d.getUTCFullYear();
|
|
666
|
+
const hours = pad(d.getUTCHours());
|
|
667
|
+
const minutes = pad(d.getUTCMinutes());
|
|
668
|
+
const seconds = pad(d.getUTCSeconds());
|
|
669
|
+
return `${day}-${month}-${year} ${hours}:${minutes}:${seconds}`;
|
|
670
|
+
};
|
|
671
|
+
|
|
658
672
|
// Formatear fecha a dd-MM-yyyy hh:mm:ss
|
|
659
673
|
let fechaFormateada = "";
|
|
660
674
|
if (fechaHoraLlegada) {
|
|
661
|
-
const fecha = new Date(fechaHoraLlegada);
|
|
675
|
+
/* const fecha = new Date(fechaHoraLlegada);
|
|
662
676
|
const pad = (n: number) => n.toString().padStart(2, "0");
|
|
663
677
|
fechaFormateada = `${pad(fecha.getDate())}-${pad(
|
|
664
678
|
fecha.getMonth() + 1
|
|
665
679
|
)}-${fecha.getFullYear()} ${pad(fecha.getHours())}:${pad(
|
|
666
680
|
fecha.getMinutes()
|
|
667
|
-
)}:${pad(fecha.getSeconds())}`;
|
|
681
|
+
)}:${pad(fecha.getSeconds())}`; */
|
|
682
|
+
fechaFormateada = formatIsoPreserve(fechaHoraLlegada);
|
|
668
683
|
}
|
|
669
684
|
let html = "<div>";
|
|
670
685
|
if (fotoId) {
|