设置轮播图的高度和宽度一样 不能用height:100%, 只能是页面加载后取当前窗口宽度,再设置样式高度为取到的值
this.winWidth = uni.getWindowInfo().windowWidth console.log("当前窗口宽度:"+this.winWidth); <swiper class="swiper" :style="{ height: winWidth + 'px'}" circular autoplay interval="80000" @change="onSwiperChange" > ....
标签:窗口,轮播,winWidth,高度,宽度,设置 From: https://www.cnblogs.com/niunan/p/17591989.html