UNPKG

vue-tianditu2

Version:
59 lines (58 loc) 1.63 kB
import { defineComponent as p, h as a } from "vue"; import { SearchPage as c } from "./SearchPage.mjs"; /* empty css */ const u = p({ props: { /** 搜索点数组 */ pois: { type: Array, default: () => [] }, /** 分页配置 */ page: { type: Object } }, emits: { /** 点击搜索结果项触发 */ // eslint-disable-next-line @typescript-eslint/no-unused-vars "poi-click": (e) => !0, // eslint-disable-next-line @typescript-eslint/no-unused-vars "update:page": (e) => !0 }, setup(e, { emit: s }) { return () => { var r, i, o; return a( "div", { class: "tdt-search-pois", style: { display: e.pois.length ? "block" : "none" } }, [ // 点信息 ...e.pois.map((t) => a( "div", { class: "search-pois-item", onClick: () => s("poi-click", t) }, [ a("strong", { class: "search-pois-item__name" }, t.name), a("br"), a("span", { class: "search-pois-item__address" }, t.address) ] )), // 分页 a(c, { current: (r = e.page) == null ? void 0 : r.current, size: (i = e.page) == null ? void 0 : i.size, total: (o = e.page) == null ? void 0 : o.total, "onUpdate:current": (t) => { s("update:page", { ...e.page || {}, current: t }); } }) ] ); }; } }); export { u as SearchPois }; //# sourceMappingURL=SearchPois.mjs.map