- 使用
uni.createSelectorQuery()需要在生命周期mounted后进行调用。 - 自定义组件编译模式(默认模式),需要使用到
selectorQuery.in方法。
const query = uni.createSelectorQuery().in(_this).select('#test');
query.boundingClientRect(data => {
subBtnHeight = data.height;
}).exec();
本文将介绍如何在uniapp中动态获取节点信息,重点讲解在生命周期钩子后的调用方法,以及在自定义组件编译模式下利用uni.createSelectorQuery()实现节点查询的详细步骤。
uni.createSelectorQuery() 需要在生命周期 mounted 后进行调用。selectorQuery.in 方法。const query = uni.createSelectorQuery().in(_this).select('#test');
query.boundingClientRect(data => {
subBtnHeight = data.height;
}).exec();
您可能感兴趣的与本文相关的镜像
Wan2.2-T2V-A5B
Wan2.2是由通义万相开源高效文本到视频生成模型,是有50亿参数的轻量级视频生成模型,专为快速内容创作优化。支持480P视频生成,具备优秀的时序连贯性和运动推理能力
1324

被折叠的 条评论
为什么被折叠?