未验证 提交 7bc5aba8 编写于 作者: B bxpxqxd 提交者: GitHub

fix: 解决部分动画不生效的问题

上级 eb9b2ad3
...@@ -27,7 +27,7 @@ function getStyle (action) { ...@@ -27,7 +27,7 @@ function getStyle (action) {
const style = {} const style = {}
let transform = [] let transform = []
animates.forEach(animate => { animates.forEach(animate => {
const type = animate.type type type = animate.type
let args = [...animate.args] let args = [...animate.args]
if (animateTypes1.concat(animateTypes2).includes(type)) { if (animateTypes1.concat(animateTypes2).includes(type)) {
if (type.startsWith('rotate') || type.startsWith('skew')) { if (type.startsWith('rotate') || type.startsWith('skew')) {
...@@ -39,8 +39,9 @@ function getStyle (action) { ...@@ -39,8 +39,9 @@ function getStyle (action) {
args.length = 1 args.length = 1
} }
transform.push(`${type}(${args.join(',')})`) transform.push(`${type}(${args.join(',')})`)
} else if (animateTypes3.concat(animateTypes4).includes(type)) { } else if (animateTypes3.concat(animateTypes4).includes(args[0])) {
const value = args[0] type = args[0]
const value = args[1]
style[type] = animateTypes4.includes(type) ? converPx(value) : value style[type] = animateTypes4.includes(type) ? converPx(value) : value
} }
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册