From e09b07b79cc5962671966b9d42bac7e7cdf6f993 Mon Sep 17 00:00:00 2001 From: huanghong Date: Fri, 16 Mar 2018 00:43:11 +0800 Subject: [PATCH] 解决drop弹出动画异常 --- src/components/cascader/cascader.vue | 2 +- src/components/date-picker/picker.vue | 2 +- src/components/dropdown/dropdown.vue | 2 +- src/components/select/dropdown.vue | 7 +++++++ src/components/select/select.vue | 2 +- src/styles/animation/slide.less | 23 +++++++++++++++++++++++ 6 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src/components/cascader/cascader.vue b/src/components/cascader/cascader.vue index 6d8c945..22206ac 100644 --- a/src/components/cascader/cascader.vue +++ b/src/components/cascader/cascader.vue @@ -20,7 +20,7 @@ - + - +
- + { + this.resetTransformOrigin(); } }); }); @@ -64,6 +67,10 @@ } }, 300); } + }, + resetTransformOrigin() { + let placement = this.popper.popper.getAttribute('x-placement').split('-')[0]; + this.popper.popper.style.transformOrigin = placement==='bottom'?'center top':'center bottom'; } }, created () { diff --git a/src/components/select/select.vue b/src/components/select/select.vue index 3798a39..7a8ea3f 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -35,7 +35,7 @@ - +