left="30rpx"
right="30rpx"
active-text-type="primary"
indicator-type="primary"
@change="tabChange"
/>
</cell>
<cell :style="[{ height: listHeight + 'px' }]">
<list ref="list" class="Flex1" :scrollable="canScroll">
<cell ref="tab0" @appear="e => handleAppear(e,0)" @disappear="e => handleDisappear(e,0)">
<splitTitle title="楼盘介绍" @clickRight="handleClickRight(0)" />
<view class="PdV30">
<rich-text :nodes="houseIntroduce" />
</view>
</cell>
<cell ref="tab1" @appear="e => handleAppear(e,1)" @disappear="e => handleDisappear(e,1)">
<splitTitle title="户型信息" right-text="更多户型" @clickRight="handleClickRight(1)" />
<houseType :items="houseTypeList" />
</cell>
<cell ref="tab2" @appear="e => handleAppear(e,2)" @disappear="e => handleDisappear(e,2)">
<splitTitle title="预售信息" right-text="详情信息" @clickRight="handleClickRight(2)" />
<preSale :items="preSaleList" />
</cell>
<cell ref="tab3" @appear="e => handleAppear(e,3)" @disappear="e => handleDisappear(e,3)">
<splitTitle title="周边配套/交通" :show-right="false" />
<surrounding />
</cell>
<cell ref="tab4" @appear="e => handleAppear(e,4)" @disappear="e => handleDisappear(e,4)">
<splitTitle title="营销信息" right-text="详情信息" @clickRight="handleClickRight(4)" />
<marketing :items="marketingInfo" type="list" />
</cell>
<cell ref="tab5" @appear="e => handleAppear(e,5)" @disappear="e => handleDisappear(e,5)">
<splitTitle title="开盘信息" right-text="详情信息" @clickRight="handleClickRight(5)" />
<openInfo :items="openInfo" />
</cell>
<myp-list-cell>
<view :style="{height:bottomHeight + 20 + 'px'}" />
</myp-list-cell>
<bottomContact :safe-bottom-height="safeBottomHeight" from="new" @getHeight="e => { bottomHeight = e }" />
</list>
</cell>
</list>
// 都是组件化的,但是你用cell多遍历一些然后滚动也是同样的问题
tabChange(index) {
this.tabStatus = index
// #ifdef MP-WEIXIN || H5
uni.pageScrollTo({
scrollTop: this.titleTopList.at(index) + 5,
duration: 0
})
// #endif
// #ifdef APP-PLUS
this.isDragging = false
dom.scrollToElement(this.$refs.list)
setTimeout(_ => {
dom.scrollToElement(this.$refs[`tab${index}`])
}, 300)
// #endif
},
2 个回复
1***@qq.com (作者)
录屏太大了上传不上去,就是当前cell到要滚动的cell中间距离过大就滚到了底部而不是顶部,另外我用了list嵌套,list.setSpecialEffects(args),看别的帖子上说打包后就没问题但是还是不行
DCloud_UNI_Anne
用文档是示例是否能复现?如果不能的话,请简化代码提供可直接运行的最小化复现示例(上传附件)【bug优先处理规则】https://ask.dcloud.net.cn/article/38139