vuux
Version:
Vue3 Nuxt3 Nuxt4 组件库
32 lines (31 loc) • 962 B
JavaScript
import { defineComponent as n, createElementBlock as u, openBlock as i, renderSlot as t, createElementVNode as p, toDisplayString as d, unref as f } from "vue";
import { useStatistic as c } from "./hook/useStatistic.mjs";
const m = { class: "app-statistic" }, B = /* @__PURE__ */ n({
name: "Statistic",
__name: "index",
props: {
start: { default: 0 },
end: { default: 0 },
decimal: { default: "." },
decimalPlaces: { default: 0 },
useGrouping: { type: Boolean, default: !0 },
separator: { default: "," },
autoplay: { type: Boolean, default: !0 },
duration: { default: 1e3 },
prefix: { default: "" },
suffix: { default: "" }
},
setup(a, { expose: s }) {
const o = a, { displayValue: l, start: r } = c(o);
return s({
start: r
}), (e, x) => (i(), u("div", m, [
t(e.$slots, "prefix"),
p("span", null, d(f(l)), 1),
t(e.$slots, "suffix")
]));
}
});
export {
B as default
};