mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 02:16:12 +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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
width: 0,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
startX: 0,
|
startX: 0,
|
||||||
startY: 0,
|
startY: 0,
|
||||||
@ -49,8 +50,7 @@ export default {
|
|||||||
deltaX: 0,
|
deltaX: 0,
|
||||||
swipes: [],
|
swipes: [],
|
||||||
direction: '',
|
direction: '',
|
||||||
currentDuration: 0,
|
currentDuration: 0
|
||||||
width: window.innerWidth
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -91,6 +91,7 @@ export default {
|
|||||||
initialize() {
|
initialize() {
|
||||||
// reset offset when children changes
|
// reset offset when children changes
|
||||||
clearTimeout(this.timer);
|
clearTimeout(this.timer);
|
||||||
|
this.width = this.$el.getBoundingClientRect().width;
|
||||||
this.active = 0;
|
this.active = 0;
|
||||||
this.currentDuration = 0;
|
this.currentDuration = 0;
|
||||||
this.offset = this.count > 1 ? -this.width : 0;
|
this.offset = this.count > 1 ? -this.width : 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user