refactor(projects): perfect scrollbar style [完善滚动条]

This commit is contained in:
Soybean
2022-11-13 09:45:00 +08:00
parent 1bdd81a1d8
commit 1a02cab97c
5 changed files with 1014 additions and 904 deletions

View File

@ -4,13 +4,7 @@
class="h-full bg-[#f6f9f8] dark:bg-[#101014] transition duration-300 ease-in-out"
>
<router-view v-slot="{ Component, route }">
<transition
:name="theme.pageAnimateMode"
mode="out-in"
:appear="true"
@before-leave="handleBeforeLeave"
@after-enter="handleAfterEnter"
>
<transition :name="theme.pageAnimateMode" mode="out-in" :appear="true">
<keep-alive :include="routeStore.cacheRoutes">
<component :is="Component" v-if="app.reloadFlag" :key="route.fullPath" />
</keep-alive>
@ -33,23 +27,9 @@ withDefaults(defineProps<Props>(), {
showPadding: true
});
interface Emits {
/** 禁止主体溢出 */
(e: 'hide-main-overflow', hidden: boolean): void;
}
const emit = defineEmits<Emits>();
const app = useAppStore();
const theme = useThemeStore();
const routeStore = useRouteStore();
function handleBeforeLeave() {
emit('hide-main-overflow', true);
}
function handleAfterEnter() {
emit('hide-main-overflow', false);
}
</script>
<style scoped></style>