view内容:根据id实现跳转。

<scroll-view 
            scroll-y="true"
			:scroll-into-view="toViewId"
			>
				<template v-if="goodsInProgressData.length>0&&goodsInProgressData" >
					<view v-for="(item,index) in goodsInProgressData"  
						class="bottomCon-box" @tap="toGoodIdAct(item.id)"
						:key="item.id"
						id="scrollYgoodsInProgress"
					>
						

					</view>
					<view id="scrollYendOfGoods2"></view>
					<view v-for="(item,index) in endOfGoodsData" 
					id="scrollYendOfGoods"
					:key="item.id"
					@tap="toGoodId(item.id)" class="bottomCon-box">
						
					</view>
				</template>
			


				
			</scroll-view>

data内容:

toViewId:"",

js内容

midToEndOfGoodsData(){
		
				this.toViewId="scrollYendOfGoods2";
			
		},

可重复跳转js内容:

midToEndOfGoodsData(){
			if(this.toViewId=="scrollYendOfGoods2"){
				this.toViewId="scrollYendOfGoods";
			}else if(this.toViewId=="scrollYendOfGoods"){
				this.toViewId="scrollYendOfGoods2";
			}else{
				this.toViewId="scrollYendOfGoods";
			}
			
		},

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐