Skip to content

Commit

Permalink
fix(Swipe): fix wrap problems caused by decimal width in some android…
Browse files Browse the repository at this point in the history
… devices
  • Loading branch information
chenjiahan committed Feb 18, 2020
1 parent bf67079 commit 02afe72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/swipe/index.js
Expand Up @@ -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;
Expand Down

0 comments on commit 02afe72

Please sign in to comment.