提交 dcff7ca1 编写于 作者: DCloud-yyl's avatar DCloud-yyl

避免scroll-view自定义下拉属性设置padding滚动条显示位置不正确的问题

上级 9893ea4a
<template> <template>
<view style="flex: 1;"> <scroll-view class="scroll-view"
<scroll-view class="scroll-view" :refresher-enabled="true" :refresher-triggered="refresherTriggered" refresher-default-style="none"
:refresher-enabled="true" :refresher-triggered="refresherTriggered" refresher-default-style="none" @refresherpulling="onRefresherpulling"
@refresherpulling="onRefresherpulling" @refresherrefresh="onRefresherrefresh"
@refresherrefresh="onRefresherrefresh" :refresher-threshold="refresherThreshold"
:refresher-threshold="refresherThreshold" >
> <view class="content">
<view v-for="i in 20" class="content-item"> <view v-for="i in 20" class="content-item">
<text class="text">item-{{i}}</text> <text class="text">item-{{i}}</text>
</view> </view>
<refresh-box slot="refresher" :state="state" :pullingDistance="pullingDistance"></refresh-box> </view>
</scroll-view> <refresh-box slot="refresher" :state="state" :pullingDistance="pullingDistance"></refresh-box>
</view> </scroll-view>
</template> </template>
<script> <script>
...@@ -68,10 +68,13 @@ ...@@ -68,10 +68,13 @@
<style> <style>
.scroll-view { .scroll-view {
flex: 1; flex: 1;
padding: 5px 15px;
background-color: #f5f5f5; background-color: #f5f5f5;
} }
.content {
padding: 5px 15px;
}
.content-item { .content-item {
padding: 15px; padding: 15px;
margin: 5px 0; margin: 5px 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册