UNPKG

@wetspace/pro-components

Version:
57 lines (56 loc) 1.85 kB
import { defineComponent as f, computed as d, openBlock as p, createBlock as m, unref as l, normalizeProps as n, guardReactiveProps as a, withCtx as i, createVNode as P, createElementBlock as _, Fragment as b, renderList as v } from "vue"; import "../../delete-button/index.mjs"; import "../../count-down-button/index.mjs"; import "../../ellipsis/index.mjs"; import "../index.mjs"; import { WetProFormItem as I } from "../../pro-form/index.mjs"; import "../../pro-table/index.mjs"; import "../../pro-descriptions/index.mjs"; import "../../pro-list/index.mjs"; import "../../layout/index.mjs"; import "../../page/index.mjs"; import "../../guide/index.mjs"; import "../../notice-menu/index.mjs"; import "../../state/index.mjs"; import { ElSelect as k, ElOption as F } from "element-plus"; import g from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isPlainObject.mjs"; import { wetProFormItemProps as h } from "../../pro-form/src/types.mjs"; const A = /* @__PURE__ */ f({ name: "WetFormSelect", __name: "select", props: { ...h, placeholder: String, formInputProps: { type: Object } }, setup(u) { const r = u, s = d(() => { var o; return (o = r.formInputProps) != null && o.options ? r.formInputProps.options.map((e) => g(e) ? e : { label: e, value: e, disabled: !1 }) : []; }); return (o, e) => (p(), m(l(I), n(a(r)), { default: i(({ inputProps: c }) => [ P(l(k), n(a(c)), { default: i(() => [ (p(!0), _(b, null, v(s.value, (t) => (p(), m(l(F), { key: `${t.value}`, label: t.label, value: t.value }, null, 8, ["label", "value"]))), 128)) ]), _: 2 }, 1040) ]), _: 1 }, 16)); } }); export { A as default };