1***@qq.com
- 发布:2020-04-09 11:25
- 更新:2020-04-17 12:40
- 阅读:1963
验证没有问题
<template>
<view class="content">
<scroll-view class="scroll-view" :scroll-y="true" :scroll-into-view="scrollInto">
<view class="item" id="1">
<text>1</text>
</view>
<view class="item" id="2">
<text>2</text>
</view>
<view class="item" id="3">
<text>3</text>
</view>
<view class="item" id="4">
<text>4</text>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
data() {
return {
scrollInto: "3"
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
}
.scroll-view {
height: 200px;
background-color: red;
}
.item {
background-color: grey;
margin-bottom: 10px;
height: 100px;
}
</style>
1***@qq.com (作者)
是俺写逻辑有问题
2020-05-12 19:28
megamind
把你这个复制到项目里也没生效呀
2022-02-17 10:42