diff --git a/src/core/view/mixins/animation.js b/src/core/view/mixins/animation.js index 17a28f8a524add16bd4a6989b5a27525b81f3404..2739c710ad9af2329b119fa15523520db63cb2c2 100644 --- a/src/core/view/mixins/animation.js +++ b/src/core/view/mixins/animation.js @@ -27,7 +27,7 @@ function getStyle (action) { const style = {} let transform = [] animates.forEach(animate => { - const type = animate.type + type type = animate.type let args = [...animate.args] if (animateTypes1.concat(animateTypes2).includes(type)) { if (type.startsWith('rotate') || type.startsWith('skew')) { @@ -39,8 +39,9 @@ function getStyle (action) { args.length = 1 } transform.push(`${type}(${args.join(',')})`) - } else if (animateTypes3.concat(animateTypes4).includes(type)) { - const value = args[0] + } else if (animateTypes3.concat(animateTypes4).includes(args[0])) { + type = args[0] + const value = args[1] style[type] = animateTypes4.includes(type) ? converPx(value) : value } })