From 16ab12fd826fe61cd73137c6ea03a01ffbe56a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BD=B3?= Date: Tue, 20 Aug 2019 19:05:43 +0800 Subject: [PATCH] fix: lint some code --- src/components/modal/modal.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index e2c1c304..0fec1756 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 || 0 ? parseFloat(this.styles.top) : 0 - let customLeft = this.styles.left || 0 ? 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);