ideaz-element
Version:
<p align="center"> <a href="" target="_blank" rel="noopener noreferrer"> <img src="./docs/public/logo.svg" alt="Ideaz Element" width="180" style="width: 180px;" /> </a> </p>
33 lines (32 loc) • 1.12 kB
JavaScript
import { createVNode as i } from "vue";
import "../../../../utils/index.mjs";
import s from "../FormItemLabel.mjs";
import { isSlot as l, isFunction as t } from "../../../../utils/is.mjs";
function P(r, m, a) {
const e = {}, n = () => l(r.label) ? r.label : "label";
if (e[n()] = () => {
var f;
const o = n();
return l(r.label) && t(m[o]) ? m[o]() : t(r.label) ? r.label() : r.formItemProps && t(r.formItemProps.label) ? r.formItemProps.label() : i(s, {
...r.formItemProps,
colon: Object.prototype.hasOwnProperty.call(r.formItemProps || {}, "colon") ? (f = r.formItemProps) == null ? void 0 : f.colon : a.colon
}, null);
}, r.error)
if (l(r.error) && t(m[r.error])) {
const o = r.error;
e[o] = () => i("div", {
class: "el-form-item__error"
}, [m[o]()]);
} else t(r.error) ? e.error = () => i("div", {
class: "el-form-item__error"
}, [r.error()]) : e.error = () => i("div", {
class: "el-form-item__error"
}, [r.error]);
return {
scopedSlots: e
};
}
export {
P as useFormSlots
};
//# sourceMappingURL=useFormSlots.mjs.map