update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user