mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-17 17:26:38 +08:00
feat(projects): 返回顶部功能适配新布局
This commit is contained in:
parent
42e6de395f
commit
54e2cb51cf
@ -30,7 +30,7 @@
|
|||||||
<global-footer />
|
<global-footer />
|
||||||
</template>
|
</template>
|
||||||
</admin-layout>
|
</admin-layout>
|
||||||
<global-back-top />
|
<n-back-top :key="theme.scrollMode" :listen-to="`#${app.scrollElId}`" class="z-100" />
|
||||||
<setting-drawer />
|
<setting-drawer />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -38,15 +38,7 @@
|
|||||||
import { AdminLayout } from '@soybeanjs/vue-materials';
|
import { AdminLayout } from '@soybeanjs/vue-materials';
|
||||||
import { useAppStore, useThemeStore } from '@/store';
|
import { useAppStore, useThemeStore } from '@/store';
|
||||||
import { useBasicLayout } from '@/composables';
|
import { useBasicLayout } from '@/composables';
|
||||||
import {
|
import { GlobalContent, GlobalFooter, GlobalHeader, GlobalSider, GlobalTab, SettingDrawer } from '../common';
|
||||||
GlobalBackTop,
|
|
||||||
GlobalContent,
|
|
||||||
GlobalFooter,
|
|
||||||
GlobalHeader,
|
|
||||||
GlobalSider,
|
|
||||||
GlobalTab,
|
|
||||||
SettingDrawer
|
|
||||||
} from '../common';
|
|
||||||
|
|
||||||
defineOptions({ name: 'BasicLayout' });
|
defineOptions({ name: 'BasicLayout' });
|
||||||
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
<template>
|
|
||||||
<n-back-top :show="show" class="z-1000" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { computed } from 'vue';
|
|
||||||
import { useWindowScroll } from '@vueuse/core';
|
|
||||||
|
|
||||||
defineOptions({ name: 'GlobalBackTop' });
|
|
||||||
|
|
||||||
const { y: scrollY } = useWindowScroll();
|
|
||||||
|
|
||||||
const show = computed(() => scrollY.value > 180);
|
|
||||||
</script>
|
|
||||||
<style scoped></style>
|
|
@ -5,6 +5,5 @@ import GlobalSider from './global-sider/index.vue';
|
|||||||
import GlobalContent from './global-content/index.vue';
|
import GlobalContent from './global-content/index.vue';
|
||||||
import GlobalFooter from './global-footer/index.vue';
|
import GlobalFooter from './global-footer/index.vue';
|
||||||
import GlobalLogo from './global-logo/index.vue';
|
import GlobalLogo from './global-logo/index.vue';
|
||||||
import GlobalBackTop from './global-back-top/index.vue';
|
|
||||||
|
|
||||||
export { SettingDrawer, GlobalHeader, GlobalTab, GlobalSider, GlobalContent, GlobalFooter, GlobalLogo, GlobalBackTop };
|
export { SettingDrawer, GlobalHeader, GlobalTab, GlobalSider, GlobalContent, GlobalFooter, GlobalLogo };
|
||||||
|
Loading…
Reference in New Issue
Block a user