This commit is contained in:
2025-06-23 19:07:23 +08:00
parent 1ae5c75f5e
commit b98de4746d
5 changed files with 95 additions and 17 deletions

View File

@@ -26,6 +26,7 @@ const MyBackfill = defineAsyncComponent(() => import('./components/MyBackfill.vu
const ReviewCommunication = defineAsyncComponent(() => import('./components/ReviewCommunication.vue'));
// #endif
const showMenu = ref(false);
const ScrollViewRef = ref();
const details = ref(null);
const home = ref(false);
@@ -144,6 +145,16 @@ const setScroll = (value) => {
});
}
const scroll = ({detail: {scrollTop}}) => {
const systemInfo = uni.getSystemInfoSync();
const screenHeight = systemInfo.screenHeight;
console.log('屏幕高度:', screenHeight);
if (scrollTop > screenHeight) {
showMenu.value = true;
} else {
showMenu.value = false;
}
let last = menuTabs[0];
for (const k of menuTabs) {
if (scrollTop + 300 > k.value) {
@@ -159,7 +170,7 @@ const scroll = ({detail: {scrollTop}}) => {
<!--任务详情-->
<XNav :delta="delta"></XNav>
<x-notice-bar></x-notice-bar>
<left-menu :tabs="menuTabs" @top="topTop" @setScroll="setScroll"></left-menu>
<left-menu v-show="showMenu" :tabs="menuTabs" @top="topTop" @setScroll="setScroll"></left-menu>
<scroll-view
scroll-y