comic-plus
Version:
<p align="center"> <img width="200px" src="./logo.png"/> </p>
46 lines (45 loc) • 1.27 kB
JavaScript
import { defineComponent, ref, computed, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, vShow } from "vue";
import "../style/loadingbar.css";
const _hoisted_1 = { class: "cu-loadingbar" };
const _sfc_main = /* @__PURE__ */ defineComponent({
...{
name: "CuLoadingbar"
},
__name: "main",
props: {
distroy: Function
},
setup(__props, { expose: __expose }) {
const progress = ref(0);
const status = ref("loading");
const show = ref(false);
const scheduleStyle = computed(() => {
return {
width: progress.value + "%"
};
});
__expose({
progress,
status,
show
});
return (_ctx, _cache) => {
return openBlock(), createBlock(Transition, { name: "loadingbar" }, {
default: withCtx(() => [
withDirectives(createElementVNode("div", _hoisted_1, [
createElementVNode("div", {
class: normalizeClass(["cu-loadingbar__schedule", status.value]),
style: normalizeStyle(scheduleStyle.value)
}, null, 6)
], 512), [
[vShow, show.value]
])
]),
_: 1
});
};
}
});
export {
_sfc_main as default
};