import { ref as m, resolveComponent as y, openBlock as o, createElementBlock as S, createVNode as u, withCtx as v, createBlock as h, resolveDynamicComponent as g, createCommentVNode as b, renderSlot as w, createTextVNode as B, toDisplayString as x, withDirectives as C, vShow as k } from "vue"; import { n as z, B as U } from "./index2.js"; const V = { class: "s-user-select-button-common" }, $ = { __name: "SUserSelectButton", props: { // 已选值:单选为字符串,多选为数组(与 s-user-select 的 value 一致),支持 v-model:value value: { type: [String, Array], default() { return ""; } }, // 是否多选,false 为单选 multiple: { type: Boolean, default: !0 }, // 按钮文案 buttonText: { type: String, default() { return window.$l("选择人员"); } }, // 按钮类型:default / primary / dashed / link / text type: { type: String, default: "default" }, // 按钮尺寸:large / middle / small size: { type: String, default: "middle" }, // 是否禁用 disabled: { type: Boolean, default: !1 }, // 弹窗标题 title: { type: String, default() { return window.$l("人员选择"); } }, // 未选择时的占位文案 placeholder: { type: String, default() { return window.$l("请选择"); } }, // 是否显示按钮图标 icon: { type: String, default: "" } }, emits: ["change", "update:value"], setup(e, { expose: r, emit: c }) { const i = e, n = c, l = m(null), a = () => { i.disabled || l.value && l.value.open(); }, s = (t) => { n("update:value", t); }, d = (...t) => { n("change", ...t); }; return r({ open: a }), (t, D) => { const f = U, p = y("s-user-select"); return o(), S("span", V, [ u(f, { type: e.type, size: e.size, disabled: e.disabled, onClick: a }, { default: v(() => [ e.icon ? (o(), h(g(e.icon), { key: 0 })) : b("", !0), w(t.$slots, "default", {}, () => [ B(x(e.buttonText), 1) ], !0) ]), _: 3 }, 8, ["type", "size", "disabled"]), C(u(p, { ref_key: "userSelectRef", ref: l, value: e.value, multiple: e.multiple, title: e.title, placeholder: e.placeholder, "onUpdate:value": s, onChange: d }, null, 8, ["value", "multiple", "title", "placeholder"]), [ [k, !1] ]) ]); }; } }, R = /* @__PURE__ */ z($, [["__scopeId", "data-v-2abba852"]]); export { R as default };