当前位置:网站首页>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
边栏推荐
- 聊聊自动化测试的度量指标
- go语言慢速入门——go运算符
- QT Chinese garbled constant newline ultimate solution
- Little sister's notes: how do I learn simple source code to expand my horizons
- The XML format of labelimg annotation is converted to yolov5
- [C language programming] branch structure
- 【降维打击,带你深度学习CPU(上)】
- 【用C语言绘制谢尔宾斯基三角形】
- 面试必问 | 一个线程从创建到消亡要经历哪些阶段?
- 【Redis】快速入门
猜你喜欢

Multipoint bidirectional republication and routing strategy topology experiment
![[C language programming] branch structure](/img/17/f9d5360d8802d29079dcbfcc302003.png)
[C language programming] branch structure

【Redis】快速入门

com.fasterxml.jackson.databind.exc.InvalidDefinitionException

I wish you a happy Chinese Valentine's day and invite you to read the source code together

Hcip day 6 OSPF static experiment

Towhee 每周模型

创业3年,现在鹅厂,年收入百万+,作为软件测试前辈的一些建议....

com.fasterxml.jackson.databind.exc.InvalidDefinitionException

pyqt5使用pyqtgraph画动态散点图
随机推荐
Prometheus operation and maintenance tool promtool (III) debug function
Sort the three integers from large to small (introduce various methods in detail)
什么是进程?
LeetCode->二分法(三)
Prompt to leave the page
Little sister's notes: how do I learn simple source code to expand my horizons
最新多线程&高并发学习资料,面试心里有底气
Hcip the next day
祝大家七夕快乐,邀你源码共读
线程和进程
Redis distributed lock implemented by annotation
Go language slow start -- go operator
猜拳小程序 基于Object-C 新手上路
[brother Yang takes you to play with the linear table (4) - chain queue]
c语言:深度学习递归
Plato Farm有望通过Elephant Swap,进一步向外拓展生态
【Redis】快速入门
Basic theoretical knowledge of software testing - concept
Constant knowledge explanation of C language
文章摘要智能提取【基于BERT技术】