Skip to content

Commit

Permalink
Merge pull request umicro#408 from yuanjianhua/fix-swiper
Browse files Browse the repository at this point in the history
fix: 修复已设置单位 uni..config.unit = 'rpx'时,线型指示器 transform 的位置翻倍,导致指示器超出宽度
  • Loading branch information
orangepro11 committed Mar 8, 2022
2 parents 6ec6693 + 5cdb1d7 commit 64a2022
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
lineStyle() {
let style = {}
style.width = uni.$u.addUnit(this.lineWidth)
style.transform = `translateX(${ this.current * this.lineWidth }px)`
style.transform = `translateX(${ uni.$u.addUnit(this.current * this.lineWidth) })`
style.backgroundColor = this.indicatorActiveColor
return style
},
Expand Down

0 comments on commit 64a2022

Please sign in to comment.