mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[bugfix] Swipe width calc error (#258)
* [bugfix] CouponList always show empty info * [bugfix] add click feedback of buttons in components * [Doc] add custom theme document * [new feature] Notice bar support more props * [bugfix] PullRefresh test cases * [bugfix] unused NoticeBar style * [bugfix] Swipe width calc error
This commit is contained in:
parent
47d625a827
commit
aab238347d
@ -42,6 +42,7 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
width: 0,
|
||||
offset: 0,
|
||||
startX: 0,
|
||||
startY: 0,
|
||||
@ -49,8 +50,7 @@ export default {
|
||||
deltaX: 0,
|
||||
swipes: [],
|
||||
direction: '',
|
||||
currentDuration: 0,
|
||||
width: window.innerWidth
|
||||
currentDuration: 0
|
||||
};
|
||||
},
|
||||
|
||||
@ -91,6 +91,7 @@ export default {
|
||||
initialize() {
|
||||
// reset offset when children changes
|
||||
clearTimeout(this.timer);
|
||||
this.width = this.$el.getBoundingClientRect().width;
|
||||
this.active = 0;
|
||||
this.currentDuration = 0;
|
||||
this.offset = this.count > 1 ? -this.width : 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user