UNPKG

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>

61 lines (60 loc) 2.46 kB
import { defineComponent as g, h as a, mergeProps as p } from "vue"; import "../../../node_modules/.pnpm/@vueuse_core@10.11.0_@vue_composition-api@1.7.2_vue@3.4.27_typescript@5.4.5___vue@3.4.27_typescript@5.4.5_/node_modules/@vueuse/core/index.mjs"; import { ElDescriptionsItem as s, ElDescriptions as x } from "element-plus"; import "../../../shared/index.mjs"; import "../../../node_modules/.pnpm/lodash-unified@1.0.3_@types_lodash-es@4.17.12_lodash-es@4.17.21_lodash@4.17.21/node_modules/lodash-unified/import.mjs"; import "../../../utils/index.mjs"; import { descriptionsProps as b } from "./descriptions.mjs"; import { useFormSize as A } from "../../../hooks/useFormSize.mjs"; import { useNamespace as D } from "../../../hooks/useNamespace.mjs"; import { reactiveOmit as S } from "../../../node_modules/.pnpm/@vueuse_shared@10.11.0_@vue_composition-api@1.7.2_vue@3.4.27_typescript@5.4.5___vue@3.4.27_typescript@5.4.5_/node_modules/@vueuse/shared/index.mjs"; import { isFunction as i, isArray as v, isString as z } from "../../../utils/is.mjs"; import E from "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get.mjs"; import { getContentByRenderAndSlot as l } from "../../../shared/getContentByRenderAndSlot.mjs"; const k = /* @__PURE__ */ g({ name: "ZDescriptions", props: b, setup(e, { slots: n }) { const o = A(), u = S(e, "title", "extra", "columns", "detail", "align", "labelAlign"), f = D("descriptions"); function c(r) { if (n[`detail-${r.prop}`]) return n[`detail-${r.prop}`]({ size: o.value, item: e.detail }); if (r.render) return i(r.render) ? r.render(e.detail) : String(r.render); { const t = E(e.detail, r.prop, ""); return v(t) ? t.join(", ") : t; } } function m() { var r; return (r = e.columns) == null ? void 0 : r.map((t) => a(s, { ...t, align: t.align ?? e.align, labelAlign: t.labelAlign ?? e.labelAlign }, { default: () => c(t), label: () => l(t.label, n, t) })); } function d() { return i(e.extra) ? e.extra() : z(e.extra) ? e.extra : i(n.extra) ? n.extra() : null; } return () => a(x, p(u, { class: f.b() }), { default: () => [m(), n.default && n.default()], title: () => l(e.title, n), extra: () => d() }); } }); export { k as default }; //# sourceMappingURL=index.mjs.map