diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index 0fec1756..db951e88 100644 --- a/src/components/modal/modal.vue +++ b/src/components/modal/modal.vue @@ -202,8 +202,8 @@ let style = {}; if (this.draggable) { - let customTop = this.styles.top ? parseFloat(this.styles.top) : 0; - let customLeft = this.styles.left ? parseFloat(this.styles.left) : 0; + let customTop = this.styles.top ? parseFloat(this.styles.top) : 0; + let customLeft = this.styles.left ? parseFloat(this.styles.left) : 0; if (this.dragData.x !== null) style.left = `${this.dragData.x - customLeft}px`; if (this.dragData.y !== null) style.top = `${this.dragData.y - customTop}px`; const width = parseInt(this.width);