记录uniapp无法获取$ref中的值 获取有两个前置条件 在onReady中使用uni.createSelectorQuery()方法 前面的图片高度设置好 // uniapp在ios系统中不支持直接使用this.$ref.xxxx.$el的值 onReady() { uni.createSelectorQuery().in(this).select("#tabs").boundingClientRect((data) => { this.tabHeight = data.top + data.height }).exec(); }