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';  不加花括号

posted @ 2023-06-25 17:08  424174余  阅读(14)  评论(0编辑  收藏  举报