代码:
<picker-view indicator-style="height: 50px;" style="width: 100%; height: 200px;" value="{{value}}" bindchange="bindChange">
<picker-view-column >
<view wx:for="{{years}}" wx:key="index" style="line-height: 50px">{{item}}年</view>
</picker-view-column>
<picker-view-column >
<view wx:for="{{months}}" wx:key="index" style="line-height: 50px">{{item}}月</view>
</picker-view-column>
<picker-view-column >
<view wx:for="{{days}}" wx:key="index" style="line-height: 50px">{{item}}日</view>
</picker-view-column>
</picker-view>
看看全局样式里有没有.wrapper这个样式并且设置了flex-drection: column,屏蔽了就会发现显示正常了。
贴个代码片段看看
眼睛和脑子 可不能直接运行代码