廢話不說。直接上解決方法。
在頁面中,添加以下css即可。
uni-picker-view {
display: block;
}
uni-picker-view .uni-picker-view-wrapper {
display: flex;
position: relative;
overflow: hidden;
height: 100%;
background-color: white;
}
uni-picker-view[hidden] {
display: none;
}
picker-view {
width: 100%;
height: 600upx;
margin-top:20upx;
}
picker-view-column,可能還需要添加下面的樣式
.item {
line-height: 100upx;
text-align: center;
}
轉自:https://www.cnblogs.com/shen55/articles/11663877.html