From dc39bb887d160d79a7ef295a2330b5a9e1eb3d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Fri, 24 May 2019 17:22:18 +0800 Subject: [PATCH] [bugfix] DropdownMenu: incorrect position in some browsers --- docs/markdown/changelog.zh-CN.md | 1 + packages/dropdown-menu/index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/markdown/changelog.zh-CN.md b/docs/markdown/changelog.zh-CN.md index 7988639a8..7662be5f8 100644 --- a/docs/markdown/changelog.zh-CN.md +++ b/docs/markdown/changelog.zh-CN.md @@ -27,6 +27,7 @@ ##### DropdownItem - 新增`title-class`属性 +- 修复在部分浏览器上定位错误的问题 ##### Picker diff --git a/packages/dropdown-menu/index.js b/packages/dropdown-menu/index.js index 74216200c..1a067efa6 100644 --- a/packages/dropdown-menu/index.js +++ b/packages/dropdown-menu/index.js @@ -44,7 +44,7 @@ export default sfc({ toggleItem(active) { const { menu } = this.$refs; const rect = menu.getBoundingClientRect(); - this.top = rect.y + rect.height; + this.top = rect.top + rect.height; this.children.forEach((item, index) => { if (index === active) {