UNPKG

vue-city-pinyin

Version:
77 lines (76 loc) 2.75 kB
import k from "./city-select.vue2.js"; import { resolveComponent as v, createElementBlock as s, openBlock as n, normalizeClass as l, createElementVNode as i, createVNode as c, withCtx as C, Fragment as a, renderList as p, toDisplayString as d, withDirectives as y, createCommentVNode as g, vShow as h } from "vue"; import $ from "../../_virtual/_plugin-vue_export-helper.js"; const E = ["value"], w = ["onClick"], M = { key: 0 }, N = ["title", "onClick"]; function O(e, t, T, z, B, S) { const m = v("Tooltip"); return n(), s("div", { class: l(e.wrapCls) }, [ i("div", { class: l(e.pickerCls), onMouseout: t[3] || (t[3] = (...o) => e.endChoice && e.endChoice(...o)), onMouseover: t[4] || (t[4] = (...o) => e.startMouseOver && e.startMouseOver(...o)) }, [ c(m, { ref: "tooltipRef", trigger: "click", placement: e.placement, manual: !0, onClickOutside: t[2] || (t[2] = (o) => e.clickOutside(!1)) }, { content: C(() => [ i("div", { class: l(e.panelCls) }, [ t[5] || (t[5] = i("h5", null, "选择城市", -1)), i("ul", { class: l(e.tagsCls) }, [ (n(!0), s(a, null, p(e.tagsArr, (o, r) => (n(), s("li", { key: r, class: l({ "z-on": o === e.tagKey }), onClick: (u) => e.choiceTag(o) }, d(o), 11, w))), 128)) ], 2), i("div", { class: l(e.itemsCls) }, [ (n(!0), s(a, null, p(e.cityList, (o, r) => y((n(), s("div", { key: r, class: l({ "z-hot": r === "hot" }) }, [ r !== "hot" ? (n(), s("h6", M, d(r), 1)) : g("", !0), i("ul", null, [ (n(!0), s(a, null, p(o, (u, f) => (n(), s("li", { key: f, title: u.name, onClick: (V) => e.choiceCity(u) }, d(u.name), 9, N))), 128)) ]) ], 2)), [ [h, e.currTagIncludes(r)] ])), 128)) ], 2) ], 2) ]), default: C(() => [ i("input", { ref: "inputRef", class: l(e.inputCls), type: "text", name: "city", value: e.currCityName, onBlur: t[0] || (t[0] = (...o) => e.endChoice && e.endChoice(...o)), onFocus: t[1] || (t[1] = (...o) => e.startChoice && e.startChoice(...o)) }, null, 42, E) ]), _: 1 }, 8, ["placement"]) ], 34) ], 2); } const R = /* @__PURE__ */ $(k, [["render", O]]); export { R as default };