From a2c5781120ca664dd42836dddd323438ff04de84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BD=B3?= Date: Tue, 20 Aug 2019 18:40:38 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9moadl=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=20style=20=E9=AB=98=E5=BA=A6=E4=B8=8E=E6=8B=96?= =?UTF-8?q?=E6=8B=BD=E5=90=8E=EF=BC=8C=E7=82=B9=E5=87=BB=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E9=A3=98=E7=A7=BB=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/modal/modal.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index 3c62366d..e07eae89 100644 --- a/src/components/modal/modal.vue +++ b/src/components/modal/modal.vue @@ -199,8 +199,9 @@ let style = {}; if (this.draggable) { + let customTop = this.styles.top ? parseFloat(this.styles.top) : 0 if (this.dragData.x !== null) style.left = `${this.dragData.x}px`; - if (this.dragData.y !== null) style.top = `${this.dragData.y}px`; + if (this.dragData.y !== null) style.top = `${this.dragData.y - customTop}px`; const width = parseInt(this.width); const styleWidth = { width: width <= 100 ? `${width}%` : `${width}px` From 40bf70dd08950341cebf0f689b0cef5e22f86834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BD=B3?= Date: Tue, 20 Aug 2019 19:01:14 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9moadl=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=8B=96=E6=8B=BD=EF=BC=8C=E5=92=8C=20=E7=BB=91?= =?UTF-8?q?=E5=AE=9Astyle=20left=20=E4=B8=8Etop=20=E5=80=BC=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E7=82=B9=E5=87=BB=E6=8B=96=E6=8B=BD=E9=A3=98=E7=A7=BB?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/routers/modal.vue | 7 +++++++ src/components/modal/modal.vue | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/examples/routers/modal.vue b/examples/routers/modal.vue index 23e6a6d0..a1c95e50 100644 --- a/examples/routers/modal.vue +++ b/examples/routers/modal.vue @@ -1,6 +1,12 @@