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

优化自定义下拉刷新页面组件层级

上级 c1d3e9c2
...@@ -5,11 +5,9 @@ ...@@ -5,11 +5,9 @@
@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>
</view>
<refresh-box slot="refresher" :state="state" :pullingDistance="pullingDistance"></refresh-box> <refresh-box slot="refresher" :state="state" :pullingDistance="pullingDistance"></refresh-box>
</scroll-view> </scroll-view>
</template> </template>
...@@ -66,26 +64,23 @@ ...@@ -66,26 +64,23 @@
</script> </script>
<style> <style>
.scroll-view { .scroll-view {
flex: 1; flex: 1;
background-color: #f5f5f5;
}
.content {
padding: 5px 15px; padding: 5px 15px;
} background-color: #f5f5f5;
}
.content-item { .content-item {
padding: 15px; padding: 15px;
margin: 5px 0; margin: 5px 0;
background-color: #fff; background-color: #fff;
border-radius: 5px; border-radius: 5px;
} }
.text { .text {
font-size: 14px; font-size: 14px;
color: #666; color: #666;
line-height: 20px; line-height: 20px;
} }
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册