@wetspace/pro-components
Version:
::: tip 基本介绍
59 lines (58 loc) • 2 kB
JavaScript
import { defineComponent as P, computed as n, openBlock as p, createBlock as l, unref as m, normalizeProps as a, guardReactiveProps as u, withCtx as i, createVNode as v, createElementBlock as b, Fragment as _, renderList as I, resolveDynamicComponent as R } from "vue";
import "../../delete-button/index.mjs";
import "../../count-down-button/index.mjs";
import "../../ellipsis/index.mjs";
import "../index.mjs";
import { WetProFormItem as k } 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 { ElRadioButton as y, ElRadio as B, ElRadioGroup as E } from "element-plus";
import F from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isPlainObject.mjs";
import { wetProFormItemProps as x } from "../../pro-form/src/types.mjs";
const J = /* @__PURE__ */ P({
name: "WetFormRadio",
__name: "radio",
props: {
...x,
formInputProps: {
type: Object
}
},
setup(s) {
const e = s, c = n(() => {
var r;
return (r = e.formInputProps) != null && r.options ? e.formInputProps.options.map((o) => F(o) ? o : {
label: o,
value: o,
disabled: !1
}) : [];
}), f = n(() => {
var r;
return ((r = e.formInputProps) == null ? void 0 : r.type) === "button" ? y : B;
});
return (r, o) => (p(), l(m(k), a(u(e)), {
default: i(({ inputProps: d }) => [
v(m(E), a(u(d)), {
default: i(() => [
(p(!0), b(_, null, I(c.value, (t) => (p(), l(R(f.value), {
key: `${t.value}`,
value: t.value,
label: t.label
}, null, 8, ["value", "label"]))), 128))
]),
_: 2
}, 1040)
]),
_: 1
}, 16));
}
});
export {
J as default
};