vuux
Version:
Vue3 Nuxt3 Nuxt4 组件库
36 lines (35 loc) • 1.05 kB
JavaScript
import { defineComponent as u, createElementBlock as r, openBlock as n, Fragment as f, createCommentVNode as s, unref as e, normalizeStyle as _, normalizeClass as x, createElementVNode as i } from "vue";
import { useLoadingBar as y } from "./hook/useLoadingBar.mjs";
const g = {
key: 1,
class: "app-loading-spinner"
}, E = /* @__PURE__ */ u({
__name: "index",
setup(v, { expose: l }) {
const { visible: o, isError: a, style: c, start: m, finish: p, error: d } = y();
return l({
start: m,
finish: p,
error: d
}), (k, t) => (n(), r(f, null, [
e(o) ? (n(), r("div", {
key: 0,
class: x(["app-loading-bar", { "is-error": e(a) }]),
style: _(e(c))
}, null, 6)) : s("", !0),
e(o) ? (n(), r("div", g, [...t[0] || (t[0] = [
i("svg", { viewBox: "25 25 50 50" }, [
i("circle", {
cx: "50",
cy: "50",
r: "20",
fill: "none"
})
], -1)
])])) : s("", !0)
], 64));
}
});
export {
E as default
};