UNPKG

vue-tianditu2

Version:
43 lines (42 loc) 1.33 kB
import { defineComponent as u, computed as c, h as f, onMounted as r, onUnmounted as h } from "vue"; import { useMapRoot as l } from "../../use/mapRoot.mjs"; import { useEvent as w } from "../../use/event.mjs"; import { EVENTS as p, PROPS as s, NATIVE_EVENTS as v } from "./use/const.mjs"; import { useInit as E } from "./use/init.mjs"; import { useWatch as W } from "./use/watch.mjs"; const R = u({ name: "TdtInfowindow", props: s, emits: p, setup(t, { emit: i, slots: e }) { const d = c(() => { var n; return f( "div", { class: "tdt-infowindow-custom", style: { minWidth: t.minWidth, maxWidth: t.maxWidth, maxHeight: t.maxHeight, display: e.default && t.target ? "block" : "none" } }, (n = e.default) == null ? void 0 : n.call(e) ); }); r(async () => { h(() => o == null ? void 0 : o.closeInfoWindow()); const n = e.default ? d.value.el : void 0, o = await l(), m = E(t, n); w({ events: v, emit: i, instance: m, emitted: a }), W({ props: t, instance: m, map: o }), i("init", m); }); function a(n) { n === "close" && i("update:target", null); } return () => d.value; } }); export { R as TdtInfowindow }; //# sourceMappingURL=index.mjs.map