vue-tianditu2
Version:
31 lines (30 loc) • 680 B
JavaScript
import { watch as o } from "vue";
import { toMarker as s, toPoint as d } from "../../../utils/converter.mjs";
function u({ props: r, instance: t }) {
o(
() => r.girdSize,
(e) => e && t.setGridSize(e)
), o(
() => r.maxZoom,
(e) => e && t.setMaxZoom(e)
), o(
() => r.markers,
(e) => {
t.clearMarkers(), e != null && e.length && t.addMarkers(e.map(s));
}
), o(
() => r.styles,
(e) => {
const m = (e == null ? void 0 : e.map((f) => ({
...f,
offset: f.offset && d(f.offset)
}))) ?? [];
t.setStyles(m);
},
{ immediate: !0 }
);
}
export {
u as useWatch
};
//# sourceMappingURL=watch.mjs.map