[improvement] DropdowmMenu: optimize rect calc (#3488)

This commit is contained in:
neverland 2019-06-13 10:47:02 +08:00 committed by GitHub
parent 153fb9d69f
commit 156ac95382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ export default sfc({
toggleItem(active) {
const { menu } = this.$refs;
const rect = menu.getBoundingClientRect();
this.top = rect.top + rect.height;
this.top = rect.bottom;
this.children.forEach((item, index) => {
if (index === active) {