epic-designer-gold
Version:
基于vue3的设计器,可视化开发页面表单
36 lines (35 loc) • 1.19 kB
JavaScript
import { defineComponent as m, h as u } from "vue";
/* empty css */
import { ElCheckboxGroup as c, ElCheckboxButton as r, ElCheckbox as i } from "element-plus";
const v = m({
emits: ["update:modelValue", "update:modelValueLabel"],
setup(p, { emit: o, attrs: n }) {
return () => {
const e = {
...n,
"onUpdate:modelValue": d
};
function d(a = null) {
if (Object.prototype.toString.call(a) === "[object Array]") {
const t = a.map((l) => e == null ? void 0 : e.options.find((b) => b.value === l));
o("update:modelValueLabel", t);
} else {
const t = e == null ? void 0 : e.options.find((l) => l.value === a);
o("update:modelValueLabel", t);
}
o("update:modelValue", a);
}
return u(c, e, {
default: () => {
var a, t;
return [
e != null && e.radioButton ? (a = e.options) == null ? void 0 : a.map((l) => u(r, { label: l.label, value: l.value })) : (t = e.options) == null ? void 0 : t.map((l) => u(i, { label: l.label, value: l.value }))
];
}
});
};
}
});
export {
v as default
};