[improvement] Tab: use transform to improve animation performance

This commit is contained in:
陈嘉涵
2019-05-11 11:43:30 +08:00
parent 1158a31cb1
commit 2bf84cd790
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ export default sfc({
trackStyle() {
if (this.animated) {
return {
left: `${-1 * this.curActive * 100}%`,
transform: `translate3d(${-1 * this.curActive * 100}%, 0, 0)`,
transitionDuration: `${this.duration}s`
};
}