UNPKG

@wetspace/pro-components

Version:
53 lines (52 loc) 1.79 kB
import { defineComponent as c, computed as f, openBlock as t, createBlock as m, unref as p, normalizeProps as l, guardReactiveProps as n, withCtx as a, createVNode as b, createElementBlock as d, Fragment as P, renderList as k } from "vue"; import "../../delete-button/index.mjs"; import "../../count-down-button/index.mjs"; import "../../ellipsis/index.mjs"; import "../index.mjs"; import { WetProFormItem as _ } 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 { ElCheckboxGroup as v, ElCheckbox as x } from "element-plus"; import h from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isPlainObject.mjs"; import { wetProFormItemProps as I } from "../../pro-form/src/types.mjs"; const A = /* @__PURE__ */ c({ name: "WetFormCheckbox", __name: "checkbox", props: { ...I, formInputProps: { type: Object } }, setup(u) { const o = u, i = f(() => o.formInputProps && o.formInputProps.options ? o.formInputProps.options.map((r) => h(r) ? r : { label: r, value: r, disabled: !1 }) : []); return (r, C) => (t(), m(p(_), l(n(o)), { default: a(({ inputProps: s }) => [ b(p(v), l(n(s)), { default: a(() => [ (t(!0), d(P, null, k(i.value, (e) => (t(), m(p(x), { key: `${e.value}`, label: e.label, value: e.value }, null, 8, ["label", "value"]))), 128)) ]), _: 2 }, 1040) ]), _: 1 }, 16)); } }); export { A as default };