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

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

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

DCloud_UNI_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>  
龙雨溪

龙雨溪

我记得文档写不支持

要回复问题请先登录注册