列表页面

This commit is contained in:
魏啾
2024-07-22 14:11:13 +08:00
parent e63122b160
commit f43b15a712

View File

@@ -11,9 +11,8 @@
<!-- 滚动区域 -->
<view class="scroll-panel" id="scroll-panel">
<view class="list-box">
<view class="list-boxafter" v-if="isFixed"></view>
<view class="left">
<scroll-view scroll-y="true" :style="{ 'height':scrollHeight + 'px' }"
<scroll-view :scroll-y="!isFixed" :style="{ 'height':scrollHeight + 'px' }"
:scroll-into-view="leftIntoView" :scroll-with-animation="false">
<view class="item" v-for="(item,index) in leftArray" :key="index"
:class="{ 'active':index==leftIndex }" :id="'left-'+index" :data-index="index"
@@ -21,7 +20,7 @@
</scroll-view>
</view>
<view class="main">
<scroll-view scroll-y="true" :style="{ 'height':scrollHeight + 'px' }" @scroll="mainScroll"
<scroll-view :scroll-y="!isFixed" :style="{ 'height':scrollHeight + 'px' }" @scroll="mainScroll"
:scroll-into-view="scrollInto" :scroll-with-animation="false">
<view class="item main-item" v-for="(item,index) in mainArray" :key="index" :id="'item-'+index">
<view class="title">
@@ -98,7 +97,7 @@
let view = uni.createSelectorQuery().select('#scroll-panel');
view.boundingClientRect(res => {
this.scrollTopSize = res.top;
this.scrollHeight = 1000;
this.scrollHeight = 812;
console.log(res, res.top, res.height)
setTimeout(() => {
resolve();
@@ -265,18 +264,6 @@
align-content: flex-start;
font-size: 28rpx;
position: relative;
.list-boxafter {
position: absolute;
left: 0;
top: 0;
z-index: 999;
width: 100%;
height: 100%;
display: inline-block;
background: transparent;
}
.left {
width: 200rpx;
background-color: #f6f6f6;