问题如图,多出来红色方框的空白区域

代码
<!-- wxml -->
<view class='recordArea' scroll-y='true'>
<record-panel class='recordPannel' date='2019-07-12'></record-panel>
</view>
/* wxss */
.recordArea{
width: 100%;
height: 88%;
margin-top: 10rpx;
margin-bottom: 10rpx;
display: flex;
justify-content: center;
flex-wrap: wrap;
/* 这条设置滚动条,问题就在这 */
overflow-y: auto;
}
.recordPannel{
width: 99%;
margin: 4rpx;
display: flex;
justify-content: center;
}
我是想给截图所在区域<view class='recordArea'>添加滚动条,然后如果添加的<record-panel>组件的默认高度没有超过recordArea区域的高度,则这个组件的高度会自适应填满recordArea区域。
解决方案:
用小程序自带的<scroll-view>组件实现滚动条
<scroll-view class='recordArea' scroll-y='true'>
<record-panel class='recordPannel' date='2019-07-12'></record-panel>
</scroll-view>

|