[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

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) {