chore: update deps
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
<template>
|
||||
<svg
|
||||
data-name="Layer 1"
|
||||
height="571.14799"
|
||||
viewBox="0 0 860.13137 571.14799"
|
||||
width="860.13137"
|
||||
height="571"
|
||||
viewBox="0 0 860 571"
|
||||
width="860"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
>
|
||||
|
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 8.8 KiB |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 6.4 KiB |
@@ -23,7 +23,6 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
minLoadingTime: 200,
|
||||
});
|
||||
const startTime = ref(0);
|
||||
const endTime = ref(0);
|
||||
const showSpinner = ref(false);
|
||||
const timer = ref<TimeoutHandle>();
|
||||
|
||||
@@ -37,9 +36,7 @@ watch(
|
||||
}
|
||||
startTime.value = performance.now();
|
||||
timer.value = setTimeout(() => {
|
||||
endTime.value = performance.now();
|
||||
|
||||
const loadingTime = endTime.value - startTime.value;
|
||||
const loadingTime = performance.now() - startTime.value;
|
||||
|
||||
showSpinner.value = loadingTime > props.minLoadingTime;
|
||||
}, props.minLoadingTime);
|
||||
@@ -55,12 +52,14 @@ watch(
|
||||
v-if="showSpinner"
|
||||
class="flex-center bg-overlay absolute left-0 top-0 size-full backdrop-blur-sm"
|
||||
>
|
||||
<div class="loader relative h-12 w-12"></div>
|
||||
<div
|
||||
class="loader before:bg-primary/50 after:bg-primary relative h-12 w-12 before:absolute before:left-0 before:top-[60px] before:h-[5px] before:w-12 before:animate-[loader-shadow-ani_0.5s_linear_infinite] before:rounded-[50%] before:content-[''] after:absolute after:left-0 after:top-0 after:h-full after:w-full after:animate-[loader-jump-ani_0.5s_linear_infinite] after:rounded after:content-['']"
|
||||
></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
@keyframes jump-ani {
|
||||
<style>
|
||||
@keyframes loader-jump-ani {
|
||||
15% {
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
@@ -83,7 +82,7 @@ watch(
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes shadow-ani {
|
||||
@keyframes loader-shadow-ani {
|
||||
0%,
|
||||
100% {
|
||||
transform: scale(1, 1);
|
||||
@@ -93,14 +92,4 @@ watch(
|
||||
transform: scale(1.2, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.loader {
|
||||
&::before {
|
||||
@apply bg-primary/50 absolute left-0 top-[60px] h-[5px] w-12 animate-[shadow-ani_0.5s_linear_infinite] rounded-[50%] content-[''];
|
||||
}
|
||||
|
||||
&::after {
|
||||
@apply bg-primary absolute left-0 top-0 h-full w-full animate-[jump-ani_0.5s_linear_infinite] rounded content-[''];
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "@vben/tsconfig/web.json",
|
||||
"include": ["src"]
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
@@ -18,33 +18,23 @@ const iframeRoutes = computed(() => {
|
||||
if (!enableTabbar.value) {
|
||||
return route.meta.iframeSrc ? [route] : [];
|
||||
}
|
||||
const tabs = tabsStore.getTabs.filter((tab) => !!tab.meta?.iframeSrc);
|
||||
return tabs;
|
||||
return tabsStore.getTabs.filter((tab) => !!tab.meta?.iframeSrc);
|
||||
});
|
||||
|
||||
const tabNames = computed(() => {
|
||||
const names = new Set<string>();
|
||||
iframeRoutes.value.forEach((item) => {
|
||||
names.add(item.name as string);
|
||||
});
|
||||
return names;
|
||||
});
|
||||
const tabNames = computed(
|
||||
() => new Set(iframeRoutes.value.map((item) => item.name as string)),
|
||||
);
|
||||
|
||||
const showIframe = computed(() => iframeRoutes.value.length > 0);
|
||||
|
||||
function routeShow(tabItem: RouteLocationNormalized) {
|
||||
const { name } = tabItem;
|
||||
return name === route.name;
|
||||
return tabItem.name === route.name;
|
||||
}
|
||||
|
||||
function canRender(tabItem: RouteLocationNormalized) {
|
||||
const { meta, name } = tabItem;
|
||||
|
||||
if (!name) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!tabsStore.renderRouteView) {
|
||||
if (!name || !tabsStore.renderRouteView) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -60,7 +50,7 @@ function canRender(tabItem: RouteLocationNormalized) {
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return tabsStore.getTabs.findIndex((tab) => tab.name === name) !== -1;
|
||||
return tabsStore.getTabs.some((tab) => tab.name === name);
|
||||
}
|
||||
|
||||
function hideLoading() {
|
||||
|
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "@vben/tsconfig/library.json",
|
||||
"include": ["src"]
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
Reference in New Issue
Block a user