Skip to content

Commit

Permalink
add loading animations (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fine0830 authored Aug 30, 2024
1 parent a5073dd commit d10f4ca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/
import { createApp } from "vue";
import { ElLoading } from "element-plus";
import App from "./App.vue";
import { store } from "./store";
import components from "@/components";
Expand All @@ -23,6 +24,11 @@ import { useAppStoreWithOut } from "@/store/modules/app";
import "./styles/index.ts";
import "virtual:svg-icons-register";

const loading = ElLoading.service({
lock: true,
text: "Loading...",
background: "rgba(0, 0, 0, 0.8)",
});
const app = createApp(App);
const appStore = useAppStoreWithOut();

Expand All @@ -34,7 +40,7 @@ mountApp();
async function mountApp() {
await appStore.getActivateMenus();
await appStore.queryOAPTimeInfo();

const router = await import("./router");
app.use(router.default).mount("#app");
loading.close();
}

0 comments on commit d10f4ca

Please sign in to comment.