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)
65 lines (64 loc) • 2.21 kB
JavaScript
import { defineComponent as f, computed as l, createVNode as r, Fragment as d, mergeProps as u } from "vue";
import { ElCheckboxGroup as p, ElCheckbox 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.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-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 D, useEvent as x, isProperty as b } from "../powerful-form/src/form-view-data.mjs";
import { isBolOrFun as C } from "../utils/index.mjs";
const w = /* @__PURE__ */ f({
name: "FCheckbox",
props: D(),
setup(e) {
const o = l(() => e.formItem.data), {
event: n
} = x({
formData: e.formData,
index: e.index,
formItem: e.formItem
});
return () => {
var a, i;
return r(d, null, [r(p, u({
modelValue: e.formData[e.formItem.prop],
"onUpdate:modelValue": (t) => e.formData[e.formItem.prop] = t,
style: ((a = o.value) == null ? void 0 : a.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) => r(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 {
w as FCheckbox,
w as default
};
//# sourceMappingURL=f-checkbox.mjs.map