From 02afe720c6aaeeb58036cde3072b6373e3b9254f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Tue, 18 Feb 2020 10:43:37 +0800 Subject: [PATCH] fix(Swipe): fix wrap problems caused by decimal width in some android devices --- src/swipe/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/swipe/index.js b/src/swipe/index.js index 5616e4df7..529dbfc8c 100644 --- a/src/swipe/index.js +++ b/src/swipe/index.js @@ -152,8 +152,8 @@ export default createComponent({ if (this.$el && !isHidden(this.$el)) { const rect = this.$el.getBoundingClientRect(); - this.computedWidth = +this.width || rect.width; - this.computedHeight = +this.height || rect.height; + this.computedWidth = Math.round(+this.width || rect.width); + this.computedHeight = Math.round(+this.height || rect.height); } this.swiping = true;