box.getBoundingClientRect is not a function
时间: 2023-10-12 14:08:17 浏览: 110
报错 "box.getBoundingClientRect is not a function" 表示box对象没有定义getBoundingClientRect方法。这个方法常用于获取DOM元素的位置和大小信息。根据你提供的引用内容来看,可能是因为box对象不是一个DOM元素,或者它的getBoundingClientRect方法没有被正确定义。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [vue中使用getBoundingClientRect()获取元素位置报错](https://blog.csdn.net/m0_38010595/article/details/112188554)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Vue获取元素位置 getBoundingClientRect is not a function](https://blog.csdn.net/xiahuale/article/details/87856618)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文