From e4afbadfcd8f58df4199bb066f5d6eecf0c56a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=BD=E5=A4=9A=E5=A4=A7=E7=B1=B3?= Date: Mon, 9 Aug 2021 14:38:40 +0800 Subject: [PATCH] Cascader: fix a bug that makes the browser jitter in zoom mode (#21207) --- packages/cascader/src/cascader.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cascader/src/cascader.vue b/packages/cascader/src/cascader.vue index 2458d923c5a..29e504dfa00 100644 --- a/packages/cascader/src/cascader.vue +++ b/packages/cascader/src/cascader.vue @@ -640,7 +640,7 @@ export default { } if (tags) { - const { offsetHeight } = tags; + const offsetHeight = Math.round(tags.getBoundingClientRect().height); const height = Math.max(offsetHeight + 6, inputInitialHeight) + 'px'; inputInner.style.height = height; this.updatePopper();