UNPKG

ant-design-x-vue-next

Version:

Ant Design X for Vue — community continuation aligned with @ant-design/x

69 lines (68 loc) 1.58 kB
import { defineComponent as x, useAttrs as A, computed as v, createVNode as l, mergeProps as N } from "vue"; import { Typography as _ } from "ant-design-vue"; import { b as g } from "../chunks/module-chunk.mjs"; import "../x-provider/index.mjs"; import h from "./style/index.mjs"; import S from "../x-provider/hooks/use-x-provider-context.mjs"; const w = /* @__PURE__ */ x({ name: "AXActionsCopy", inheritAttrs: !1, __name: "ActionsCopy", props: { text: { default: "" }, icon: { default: void 0 }, prefixCls: { default: void 0 }, rootClassName: { default: "" }, classNames: { default: () => ({}) }, styles: { default: () => ({}) } }, setup(n) { const t = n, o = A(), { direction: c, getPrefixCls: i } = S(), e = i("actions", t.prefixCls), [p, m, f] = h(e), r = `${e}-copy`, u = v(() => { var s; return g(e, `${e}-item`, m.value, f, t.rootClassName, o.class, (s = t.classNames) == null ? void 0 : s.root, { [`${r}-rtl`]: c.value === "rtl" }); }); return () => { var a; const { class: s, style: d, ...C } = o, y = t.icon ? { text: t.text, icon: t.icon } : { text: t.text }; return p(l("div", { class: u.value, style: { ...d, ...(a = t.styles) == null ? void 0 : a.root } }, [l(_.Text, N(C, { prefixCls: r, copyable: y }), null)])); }; } }); export { w as default };