UNPKG

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)

58 lines (57 loc) 2.02 kB
import { defineComponent as u, computed as c, createVNode as d, Fragment as x, mergeProps as D, h as l } from "vue"; import { ElSelectV2 as v } from "element-plus"; import { clearSymbol as I } from "../utils/index.mjs"; import { componentProps as y, useEvent as h, isProperty as V } from "../powerful-form/src/form-view-data.mjs"; const b = /* @__PURE__ */ u({ name: "FSelectV2", props: y(), setup(e) { const o = c(() => e.formItem.data), { event: i } = h({ formData: e.formData, index: e.index, formItem: e.formItem }); return () => { var n, r, f; return d(x, null, [d(v, D({ modelValue: e.formData[e.formItem.prop], "onUpdate:modelValue": (a) => e.formData[e.formItem.prop] = a, style: ((n = o.value) == null ? void 0 : n.style) || (e.inline ? { width: "192px" } : { width: "100%" }), options: ((r = o.value) == null ? void 0 : r.options) || [], onChange: (...a) => { i("change", ...a); }, placeholder: `请选择${I(e.formItem.text)}`, clearable: !0 }, V({ formData: e.formData, index: e.index, formItem: e.formItem }, (f = o.value) == null ? void 0 : f.property)), { default: () => { var a, t, m; return (m = (t = (a = o.value) == null ? void 0 : a.slots) == null ? void 0 : t.default) == null ? void 0 : m.call(t, l, e.formData, e.index); }, empty: () => { var a, t, m; return (m = (t = (a = o.value) == null ? void 0 : a.slots) == null ? void 0 : t.empty) == null ? void 0 : m.call(t, l, e.formData, e.index); }, prefix: () => { var a, t, m; return (m = (t = (a = o.value) == null ? void 0 : a.slots) == null ? void 0 : t.prefix) == null ? void 0 : m.call(t, l, e.formData, e.index); } })]); }; } }); export { b as FSelectV2, b as default }; //# sourceMappingURL=f-select-v2.mjs.map