UNPKG

@aplus-frontend/ui

Version:

40 lines (39 loc) 1.36 kB
import { defineComponent as n, toRef as t, createBlock as s, openBlock as c, unref as e, mergeProps as u, withCtx as f, renderSlot as m } from "vue"; import { useProvideApTextGroup as d } from "./context.mjs"; import "../config-provider/index.mjs"; import { Space as v } from "@aplus-frontend/antdv"; import { omit as y } from "lodash-unified"; import S from "./style/group.mjs"; import { useNamespace as b } from "../config-provider/hooks/use-namespace.mjs"; const w = /* @__PURE__ */ n({ name: "ApTextGroup", __name: "group", props: { colon: { type: Boolean, default: void 0 }, vertical: { type: Boolean, default: void 0 }, labelStyle: { default: void 0 }, prefixCls: {}, size: { default: () => [8, 0] }, direction: { default: "vertical" }, align: { default: "baseline" }, wrap: { type: Boolean, default: !1 } }, setup(r) { const o = r, { b: a, m: p } = b("ap-text-group"), i = S("ap-text-group"); return d({ colon: t(o.colon), vertical: t(o.vertical), labelStyle: t(o.labelStyle) }), (l, h) => (c(), s(e(v), u({ class: [e(a)(), l.direction === "horizontal" ? e(p)("horizontal") : null, e(i)] }, e(y)(o, ["colon", "vertical", "labelStyle"])), { default: f(() => [ m(l.$slots, "default") ]), _: 3 }, 16, ["class"])); } }); export { w as default };