UNPKG

tk-eui-plus

Version:

66 lines (65 loc) 1.52 kB
import { defineComponent as i, ref as s, resolveComponent as n, openBlock as a, createBlock as d, mergeProps as m, withCtx as v, createElementBlock as O, Fragment as _, renderList as b, createVNode as f } from "vue"; const h = /* @__PURE__ */ i({ __name: "index", props: { placeholder: { type: String, default: "请选择" } }, setup(l) { const o = s(""), p = [ { value: "Option1", label: "Option1" }, { value: "Option2", label: "Option2" }, { value: "Option3", label: "Option3" }, { value: "Option4", label: "Option4" }, { value: "Option5", label: "Option5" } ]; return (r, t) => { const u = n("el-option"), c = n("el-select"); return a(), d(c, m({ modelValue: o.value, "onUpdate:modelValue": t[0] || (t[0] = (e) => o.value = e), placeholder: l.placeholder }, r.$attrs, { style: { width: "240px" } }), { default: v(() => [ (a(), O( _, null, b(p, (e) => f(u, { key: e.value, label: e.label, value: e.value }, null, 8, ["label", "value"])), 64 /* STABLE_FRAGMENT */ )) ]), _: 1 /* STABLE */ }, 16, ["modelValue", "placeholder"]); }; } }), x = { install(l) { l.component("tkSelect", h); } }; export { x as default };