mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[bugfix] Swipe: use translate2d to aviod iOS11 crash bug (#518)
This commit is contained in:
parent
44b1ede990
commit
0b59725d0a
@ -20,7 +20,7 @@ export default create({
|
|||||||
style() {
|
style() {
|
||||||
return {
|
return {
|
||||||
width: this.$parent.width + 'px',
|
width: this.$parent.width + 'px',
|
||||||
transform: `translate3d(${this.offset}px, 0, 0)`
|
transform: `translate(${this.offset}px, 0)`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -85,7 +85,7 @@ export default create({
|
|||||||
paddingLeft: this.width + 'px',
|
paddingLeft: this.width + 'px',
|
||||||
width: (this.count + 2) * this.width + 'px',
|
width: (this.count + 2) * this.width + 'px',
|
||||||
transitionDuration: `${this.currentDuration}ms`,
|
transitionDuration: `${this.currentDuration}ms`,
|
||||||
transform: `translate3d(${this.offset}px, 0, 0)`
|
transform: `translate(${this.offset}px, 0)`
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ export default create({
|
|||||||
const tab = this.$refs.tabs[this.curActive];
|
const tab = this.$refs.tabs[this.curActive];
|
||||||
this.navBarStyle = {
|
this.navBarStyle = {
|
||||||
width: `${tab.offsetWidth || 0}px`,
|
width: `${tab.offsetWidth || 0}px`,
|
||||||
transform: `translate3d(${tab.offsetLeft || 0}px, 0, 0)`,
|
transform: `translate(${tab.offsetLeft || 0}px, 0)`,
|
||||||
transitionDuration: `${this.duration}s`
|
transitionDuration: `${this.duration}s`
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user