tiny-vue icon indicating copy to clipboard operation
tiny-vue copied to clipboard

🐛 [Bug]: 非必要避免使用`getBoundingClientRect` api,复杂页面使用此导致强制重排影响性能

Open tweet opened this issue 10 months ago • 1 comments

Version

5.2.6

Vue Version

2.6.14

Link to minimal reproduction

/

Step to reproduce

/

What is expected

避免使用getBoundingClientRect api

What is actually happening

https://github.com/opentiny/tiny-vue/blob/791ae37c7514a8d21ea4ed205e63ddcc90279948/packages/renderless/src/base-select/index.ts#L1723

看了下面对此值的使用,只是获取元素宽高,建议替换成其他的实现

What is your project name

,

Any additional comments (optional)

No response

tweet avatar Jan 14 '26 08:01 tweet

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]: Avoid using the getBoundingClientRect api unless necessary. Using this on complex pages will cause forced reflow and affect performance.

Issues-translate-bot avatar Jan 14 '26 08:01 Issues-translate-bot