主题
getRect
获取节点信息
引入
js
import { getRect, getAllRect } from '@/uni_modules/lime-shared/getRect'
示例
js
// * @param selector 选择器字符串
// * @param context ComponentInternalInstance 对象
// * @param node 是否获取node
// * @returns 包含节点信息的 Promise 对象
getRect('#id', this).then((res:DOMRect) => {})
getAllRect('#id', this).then((res:DOMRect) => {})