当前位置:网站首页>Dynamically set the height of applet swiper
Dynamically set the height of applet swiper
2022-07-27 02:43:00 【kilito_ 01】
According to the height of the content , Dynamic setup applet swiper Height
swiperHeightFn() {
const query = uni.createSelectorQuery().in(this);
//swiperItmeHeight yes swiper-item The class name of the package content
query.select('.swiperItmeHeight').boundingClientRect(data => {
this.swiperHeight = data.height
}).exec();
}

This can be written in a method , This method sets the height after the page is rendered , Need to use settimeout The parcel , I was in onReady
Call this method to dynamically set swiper Height
边栏推荐
猜你喜欢

Record the nth SQL exception

Smooth data migration from single table to sub table

Ubuntu基于docker的mysql主从数据库配置
![[draw rectangular coordinate system in C language]](/img/85/cf0c8a8da647888acce5ce3ee871b2.png)
[draw rectangular coordinate system in C language]

Handsomeforum Learning Forum

【斐波那契数列及螺线 基于C语言】

Hcip day 6 OSPF static experiment

Hcip first day

见证中国网安力量 “解码2022中国网安强星”即将启航
![[brother Yang takes you to play with the linear table (III) - two way linked list]](/img/64/5367ff4fb6797565cb1f9e1a8aee4e.png)
[brother Yang takes you to play with the linear table (III) - two way linked list]
随机推荐
证券公司哪家手续费最低?手机上开户安全吗
Redis installation and operation (Linux)
Is it useful to lie down with your eyes closed when you can't sleep?
GoatGui邀你参加机器学习研讨班
Towhee 每周模型
Talk about the metrics of automated testing
Record the nth SQL exception
Hcip day 3 Wan topology experiment
【无标题】
It has been established for 3 years, and now goose factory has an annual income of millions +. As some suggestions of software testing predecessors
小姐姐笔记:我是如何学习简单源码拓展视野的
贪心——376. 摆动序列
[draw sherpinski triangle in C language]
见证中国网安力量 “解码2022中国网安强星”即将启航
使用注解方式实现 Redis 分布式锁
How many holes have you stepped on in BigDecimal?
As for the pit saved by serialized variables, the data added with indexer cannot be serialized
通达信开户安全么
关于序列化变量保存的坑,加了索引器的数据不能序列化
JS 数组去重(含简单数组去重、对象数组去重)