el-plus-powerful-form
Version:
## [DOCS](https://peng-xiao-shuai.github.io/vite-vue-admin-docs/zh-CN/component_directive/component/powerful-form-doc.html)
66 lines (65 loc) • 2.25 kB
JavaScript
import { defineComponent as f, computed as l, createVNode as a, Fragment as d, mergeProps as u } from "vue";
import { ElRadioGroup as p, ElRadio as I } from "element-plus";
import "element-plus/theme-chalk/el-form.css";
import "element-plus/theme-chalk/el-form-item.css";
import "element-plus/theme-chalk/el-checkbox.css";
import "element-plus/theme-chalk/el-checkbox-group.css";
import "element-plus/theme-chalk/el-date-picker-panel.css";
import "element-plus/theme-chalk/el-radio.css";
import "element-plus/theme-chalk/el-radio-group.css";
import "element-plus/theme-chalk/el-select-v2.css";
import "element-plus/theme-chalk/el-select.css";
import "element-plus/theme-chalk/el-switch.css";
import "element-plus/theme-chalk/el-input.css";
import "element-plus/theme-chalk/el-rate.css";
import "../style.css";
import "../powerful-form/index.mjs";
import { componentProps as x, useEvent as D, isProperty as b } from "../powerful-form/src/form-view-data.mjs";
import { isBolOrFun as c } from "../utils/index.mjs";
const q = /* @__PURE__ */ f({
name: "FRadio",
props: x(),
setup(e) {
const o = l(() => e.formItem.data), {
event: n
} = D({
formData: e.formData,
index: e.index,
formItem: e.formItem
});
return () => {
var r, i;
return a(d, null, [a(p, u({
modelValue: e.formData[e.formItem.prop],
"onUpdate:modelValue": (t) => e.formData[e.formItem.prop] = t,
style: ((r = o.value) == null ? void 0 : r.style) || {},
onChange: (...t) => n("change", ...t)
}, b({
formData: e.formData,
index: e.index,
formItem: e.formItem
}, (i = o.value) == null ? void 0 : i.property)), {
default: () => {
var t;
return [(t = o.value) == null ? void 0 : t.options.map((m) => a(I, {
label: m.label,
disabled: c(m.disabled, {
formData: e.formData,
formItem: e.formItem,
index: e.index
}),
border: m.border,
name: m.name
}, {
default: () => [m.text || m.label]
}))];
}
})]);
};
}
});
export {
q as FRadio,
q as default
};
//# sourceMappingURL=f-radio.mjs.map