UNPKG

@artmate/chat

Version:

借鉴字节开源react库AntX,通过vue实现的版本

28 lines (27 loc) 771 B
import { defineComponent as n, computed as c, createBlock as p, openBlock as s, unref as l, normalizeStyle as a, withCtx as i, createElementVNode as f, toDisplayString as m } from "vue"; import { ElProgress as h } from "element-plus"; const u = { style: { color: "#fff" } }, x = /* @__PURE__ */ n({ __name: "Progress", props: { percent: {} }, setup(t) { const e = t, r = c(() => ({ width: `${30 * 2}px`, height: `${30 * 2}px` })); return (o, _) => (s(), p(l(h), { percentage: e.percent, style: a({ ...r.value }), type: "circle" }, { default: i(() => [ f("span", u, m(`${(e.percent || 0).toFixed(0)}%`), 1) ]), _: 1 }, 8, ["percentage", "style"])); } }); export { x as default };