@aplus-frontend/ui
Version:
39 lines (38 loc) • 1.27 kB
JavaScript
import { defineComponent as p, computed as c, createElementBlock as o, createCommentVNode as d, openBlock as r, normalizeStyle as a, normalizeClass as m, unref as i, Fragment as f, renderList as y, createBlock as _ } from "vue";
import "../../../config-provider/index.mjs";
import "../ApStatus.vue.mjs";
import { useNamespace as g } from "../../../config-provider/hooks/use-namespace.mjs";
import k from "../ApStatus.vue2.mjs";
const w = /* @__PURE__ */ p({
name: "ApStatusGroup",
__name: "ApStatusGroup",
props: {
padding: { default: 8 },
currentValue: { default: 0 },
statusList: { default: null },
style: {},
show: { type: Boolean, default: !0 }
},
setup(s) {
const t = s, u = c(() => ({
...t.style
})), { b: l } = g("ap-status-group");
return (n, S) => t.statusList ? (r(), o("div", {
key: 0,
class: m([i(l)()]),
style: a(u.value)
}, [
(r(!0), o(f, null, y(t.statusList, (e) => (r(), _(k, {
key: e.value,
show: e.value === n.currentValue,
color: e.color,
text: e.text,
padding: t.padding,
style: a(t.style)
}, null, 8, ["show", "color", "text", "padding", "style"]))), 128))
], 6)) : d("", !0);
}
});
export {
w as default
};