页面有一个按钮我想点击按钮时让scroll2跳转到距离顶部100rpx的位置 可是当scroll2露出来后就上不去了 被顶住了 不管改成多少数值scroll2都上不去 那么怎么才能让scroll2到达距离顶部100rpx的位置呢?
<scroll-view scroll-y scroll-top="{{test}}" class="bottom" >
<view class="scroll1" id="1">
</view>
<view class="scroll1" id="1">
</view>
<view class="scroll1" id="1">
</view>
<view class="scroll1" id="1">
</view>
<view class="scroll2" id="c">
</view>
</scroll-view>
.bottom{
width: 100%;
height: 70vh;
}
.scroll1{
min-height: 30vh;
overflow: scroll;
background-color: blue;
}
.scroll2{
min-height: 30vh;
overflow: scroll;
background-color: yellow;
}
goto(){
this.setData({
test: 100000
})
},