@aplus-frontend/ui
Version:
39 lines (38 loc) • 1.18 kB
JavaScript
import { defineComponent as u, computed as a, createElementBlock as d, createCommentVNode as i, openBlock as m, normalizeStyle as r, normalizeClass as s, unref as t, createTextVNode as f, createElementVNode as y, toDisplayString as g } from "vue";
import "../../config-provider/index.mjs";
import { useNamespace as x } from "../../config-provider/hooks/use-namespace.mjs";
const C = /* @__PURE__ */ u({
name: "ApStatus",
__name: "ApStatus",
props: {
text: {},
padding: { default: 8 },
color: { default: "#0070FF" },
show: { type: Boolean, default: !0 },
style: {}
},
setup(l) {
const e = l, n = a(() => ({
"padding-left": e.padding + "px",
"padding-right": e.padding + "px",
color: e.color,
...e.style
})), p = a(() => ({
"background-color": e.color
})), { b: c, e: o } = x("ap-status");
return (S, _) => e.show ? (m(), d("div", {
key: 0,
class: s([t(c)()]),
style: r(n.value)
}, [
f(g(e.text) + " ", 1),
y("div", {
class: s([t(o)("bg"), t(o)("primary")]),
style: r(p.value)
}, null, 6)
], 6)) : i("", !0);
}
});
export {
C as default
};