@aplus-frontend/ui
Version:
51 lines (50 loc) • 1.58 kB
JavaScript
import { defineComponent as m, createElementBlock as c, openBlock as f, createTextVNode as a, renderSlot as d, toDisplayString as t, createElementVNode as r, normalizeStyle as u, unref as o } from "vue";
import "../../config-provider/index.mjs";
import { useLocale as p } from "../../config-provider/hooks/use-locale.mjs";
import { useGlobalConfig as s } from "../../config-provider/hooks/use-global-config.mjs";
const T = /* @__PURE__ */ m({
__name: "modal-title",
props: {
title: {
type: String,
required: !0
},
count: {
type: Number,
required: !0
},
maxCount: {
type: Number,
required: !0
}
},
setup(e) {
const { t: n } = p(), l = s("uiMode", "aplus");
return (i, x) => (f(), c("div", null, [
a(t(e.title) + " ", 1),
d(i.$slots, "default", {
maxCount: e.maxCount,
count: e.count
}, () => [
r("span", {
style: u({
color: o(l) === "admin" ? "#999999" : "#8896b0",
fontSize: "12px",
fontWeight: "normal",
marginLeft: "12px"
}),
class: "product-number"
}, [
a(t(isFinite(e.maxCount) ? o(n)("ap.apTableModal.titleSuffixOne", { maxCount: e.maxCount }) : "") + t(o(n)("ap.apTableModal.titleSuffixTwo")) + " ", 1),
r("span", {
style: u({ color: o(l) === "admin" ? "#34B77C" : "#0070ff" })
}, t(e.count), 5),
a(" " + t(o(n)("ap.apTableModal.titleSuffixThree")), 1)
], 4)
])
]));
}
});
export {
T as default
};