uni-app、⼩程序之swiper-item内容过多显⽰不全的解决⽅案
最近在项⽬遇到swiper⾼度不能⾃适应,导致swiper-item ⾥⾯的内容过多时只能显⽰⼀部分,最终解决⽅案: 内容放在这
swiper-item { overflow: scroll;}
最后在后台动态获得屏幕可视区域⾼度clientHeight即可
onLoad: function () { let that = this
//uni-app是uni.getSystemInfo,微信⼩程序wx.getSystemInfo uni.getSystemInfo({
success: function (res) { //uni-app
that.clientHeight=res.windowHeight-177 //微信⼩程序 //that.setData({
// clientHeight: res.windowHeight-177 //}); } })}