Merge pull request #205 from yanbowe/main
feat(projects): fix to top [返回顶部功能适配新布局]
This commit is contained in:
commit
b549b32cbb
@ -30,7 +30,7 @@
|
||||
<global-footer />
|
||||
</template>
|
||||
</admin-layout>
|
||||
<global-back-top />
|
||||
<n-back-top :key="theme.scrollMode" :listen-to="`#${app.scrollElId}`" class="z-100" />
|
||||
<setting-drawer />
|
||||
</template>
|
||||
|
||||
@ -38,15 +38,7 @@
|
||||
import { AdminLayout } from '@soybeanjs/vue-materials';
|
||||
import { useAppStore, useThemeStore } from '@/store';
|
||||
import { useBasicLayout } from '@/composables';
|
||||
import {
|
||||
GlobalBackTop,
|
||||
GlobalContent,
|
||||
GlobalFooter,
|
||||
GlobalHeader,
|
||||
GlobalSider,
|
||||
GlobalTab,
|
||||
SettingDrawer
|
||||
} from '../common';
|
||||
import { GlobalContent, GlobalFooter, GlobalHeader, GlobalSider, GlobalTab, SettingDrawer } from '../common';
|
||||
|
||||
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 GlobalFooter from './global-footer/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