fix:修复放大情况下下拉偏移的情况

This commit is contained in:
2026-02-13 10:43:09 +08:00
parent ea67e30fbb
commit abf78124cf
6 changed files with 33 additions and 23 deletions
@@ -55,10 +55,11 @@ export default defineComponent({
function onResize() {
if (triggerRef.value) {
const { width, height, left, top } = triggerRef.value.getBoundingClientRect()
const zoom = parseFloat(getComputedStyle(document.body).zoom) || 1
dropdownPosition.value = {
w: width,
x: left,
y: top + height + 2,
w: width / zoom,
x: left / zoom,
y: top / zoom + height / zoom + 2,
}
}
}