@aplus-frontend/ui
Version:
36 lines (35 loc) • 865 B
JavaScript
import { createApp as e, createVNode as n } from "vue";
import "./index.vue.mjs";
import { APConfigProvider as o } from "../config-provider/index.mjs";
import r from "./index.vue2.mjs";
class h {
_options = {
_globalMark: !0
};
container = null;
app = null;
instance = null;
constructor(t) {
t && (this._options = {
...this._options,
...t
});
}
_getInstance() {
return this.instance ? this.instance : (this.container = document.createElement("div"), this.app = e(n(o, null, {
default: () => [n(r, {
ref: (t) => this.instance = t
}, null)]
})), this.app.mount(this.container), document.body.appendChild(this.container.firstElementChild), this.instance);
}
open(t) {
const i = {
...this._options,
...t
};
this._getInstance().start(i);
}
}
export {
h as LoadingBar
};