@aplus-frontend/ui
Version:
48 lines (47 loc) • 1.4 kB
JavaScript
import { defineComponent as r, computed as m, createVNode as t, createElementBlock as d, openBlock as o, createBlock as l, createCommentVNode as u, resolveDynamicComponent as f, unref as s, withCtx as h } from "vue";
import { QuestionCircleOutlined as b } from "@ant-design/icons-vue";
import { TypographyText as _, Tooltip as y } from "@aplus-frontend/antdv";
import "../../../config-provider/index.mjs";
import { useNamespace as x } from "../../../config-provider/hooks/use-namespace.mjs";
const C = {
style: {
display: "inline-flex"
}
}, B = /* @__PURE__ */ r({
__name: "index",
props: {
helpMessage: {},
label: {}
},
setup(i) {
const n = i, {
m: p
} = x("ap-descriptions"), a = m(() => {
const e = n.label;
return typeof e != "object" ? t("div", {
class: p("item-label"),
style: {
maxWidth: "var(--ap-descriptions-item-label-width, auto)"
}
}, [t(_, {
ellipsis: {
tooltip: e
},
content: e
}, null)]) : e;
});
return (e, c) => (o(), d("span", C, [(o(), l(f(a.value))), e.helpMessage ? (o(), l(s(y), {
key: 0,
placement: "topLeft",
title: e.helpMessage
}, {
default: h(() => [t(s(b), {
class: "ap-descriptions-item-content__help"
})]),
_: 1
}, 8, ["title"])) : u("", !0)]));
}
});
export {
B as default
};