ant-design-x-vue-next
Version:
Ant Design X for Vue — community continuation aligned with @ant-design/x
75 lines (74 loc) • 1.98 kB
JavaScript
import { defineComponent as C, useAttrs as N, ref as g, computed as x, createVNode as i, mergeProps as y, isVNode as _ } from "vue";
import { Divider as S } from "ant-design-vue";
import { b as P } from "../chunks/module-chunk.mjs";
import A from "../_util/hooks/use-x-component-config.mjs";
import "../x-provider/index.mjs";
import V from "./Bubble.mjs";
import h from "./style/index.mjs";
import j from "../x-provider/hooks/use-x-provider-context.mjs";
function D(t) {
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !_(t);
}
const M = /* @__PURE__ */ C({
name: "AXBubbleDivider",
inheritAttrs: !1,
__name: "BubbleDivider",
props: {
prefixCls: {},
rootClassName: {
default: ""
},
styles: {
default: () => ({})
},
classNames: {
default: () => ({})
},
content: {
default: ""
},
dividerProps: {
default: () => ({})
}
},
setup(t, {
expose: m
}) {
const s = t, a = N(), l = g(), n = A("bubble"), {
getPrefixCls: c
} = j(), r = c("bubble", s.prefixCls), [f, u, p] = h(() => r);
m({
get nativeElement() {
var e;
return (e = l.value) == null ? void 0 : e.nativeElement;
}
});
const d = x(() => {
var e, o;
return P(u.value, p, r, `${r}-divider`, n.value.className, (e = n.value.classNames) == null ? void 0 : e.root, a.class, (o = s.classNames) == null ? void 0 : o.root, s.rootClassName);
}), b = (e) => i(S, s.dividerProps, D(e) ? e : {
default: () => [e]
});
return () => {
const {
class: e,
style: o,
...v
} = a;
return f(i(V, y(v, {
ref: l,
class: d.value,
style: o,
styles: s.styles,
classNames: s.classNames,
prefixCls: r,
variant: "borderless",
content: s.content,
messageRender: b
}), null));
};
}
});
export {
M as default
};