feat: |UI| add loading for lazy load component (#597)

This commit is contained in:
Dream Hunter
2025-02-27 00:36:13 +08:00
committed by GitHub
parent 144a792cb2
commit 983300acf4
3 changed files with 17 additions and 3 deletions
+4
View File
@@ -126,7 +126,9 @@ const menuOptions = computed(() => [
type: menuValue.value == "admin" ? "primary" : "default",
style: "width: 100%",
onClick: async () => {
loading.value = true;
await router.push(getRouterPathWithLang('/admin', locale.value));
loading.value = false;
showMobileMenu.value = false;
}
},
@@ -214,7 +216,9 @@ const logoClick = async () => {
if (logoClickCount.value >= 5) {
logoClickCount.value = 0;
message.info("Change to admin Page");
loading.value = true;
await router.push(getRouterPathWithLang('/admin', locale.value));
loading.value = false;
} else {
logoClickCount.value++;
}