uniapp开发微信小程序随笔
1)获取某个元素距离顶部的高度
getObjectToTop(obj) {
let query = uni.createSelectorQuery().in(this);
query.select(obj).boundingClientRect(data => {
this.objtop = data.top;
}).exec();
}
2)
import func from '@/utils/func.js'; 不加花括号
浙公网安备 33010602011771号