@aplus-frontend/ui
Version:
51 lines (50 loc) • 1.51 kB
JavaScript
import { defineComponent as m, createElementBlock as c, openBlock as f, createTextVNode as r, renderSlot as d, toDisplayString as t, createElementVNode as l, normalizeStyle as u, unref as o } from "vue";
import "../../config-provider/index.mjs";
import { useToken as p } from "../../config-provider/hooks/use-token.mjs";
import { useLocale as s } from "../../config-provider/hooks/use-locale.mjs";
const b = /* @__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 } = s(), { token: a } = p();
return (i, x) => (f(), c("div", null, [
r(t(e.title) + " ", 1),
d(i.$slots, "default", {
maxCount: e.maxCount,
count: e.count
}, () => [
l("span", {
style: u({
color: o(a).textColor3,
fontSize: "12px",
fontWeight: "normal",
marginLeft: "12px"
}),
class: "product-number"
}, [
r(t(isFinite(e.maxCount) ? o(n)("ap.apTableModal.titleSuffixOne", { maxCount: e.maxCount }) : "") + t(o(n)("ap.apTableModal.titleSuffixTwo")) + " ", 1),
l("span", {
style: u({ color: o(a).colorLink })
}, t(e.count), 5),
r(" " + t(o(n)("ap.apTableModal.titleSuffixThree")), 1)
], 4)
])
]));
}
});
export {
b as default
};