mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): perfect scrollbar style [完善滚动条]
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user