1***@qq.com
1***@qq.com
  • 发布:2020-04-09 11:25
  • 更新:2020-04-17 12:40
  • 阅读:1963

scroll-view的scroll-into-view在nvue未生效

分类:uni-app
2020-04-09 11:25 负责人:无 分享
已邀请:
DCloud_uni-ad_HDX

DCloud_uni-ad_HDX

验证没有问题

<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

龙雨溪

龙雨溪

我记得文档写不支持

该问题目前已经被锁定, 无法添加新回复