Skip to content

Commit c9e7257

Browse files
committed
fix error & update package
1 parent 4eb6adf commit c9e7257

File tree

3 files changed

+12
-353
lines changed

3 files changed

+12
-353
lines changed

packages/core/src/platform/builtInMixins/parse-animation.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ function parseTransitionSingleProp (vals, property = '') {
128128
const bezierParams = getBezierParams(value)
129129
return {
130130
prop: 'transitionTimingFunction',
131-
value: bezierParams?.length ? Easing.bezier(bezierParams[0], bezierParams[1], bezierParams[2], bezierParams[3]) : easingKey[val] || Easing.inOut(Easing.ease)
131+
value: bezierParams?.length
132+
? Easing.bezier(bezierParams[0], bezierParams[1], bezierParams[2], bezierParams[3])
133+
: easingKey[value] || Easing.inOut(Easing.ease)
132134
}
133135
}
134136
// behavior
@@ -156,7 +158,7 @@ function parseTransitionSingleProp (vals, property = '') {
156158
}
157159
// animation & transition 解析
158160
export function parseAnimationStyle (originalStyle, cssProp = 'animation') {
159-
let animationData = {}
161+
const animationData = {}
160162
Object.entries(originalStyle).forEach(([propName, value]) => {
161163
if (!propName.includes(cssProp)) return
162164
if (propName === cssProp) {
@@ -172,27 +174,27 @@ export function parseAnimationStyle (originalStyle, cssProp = 'animation') {
172174
}, {})
173175
Object.entries(vals).forEach(([prop, vals]) => {
174176
if (animationData[prop]?.length) {
175-
(animationData[prop].length >= vals.length ? animationData[prop] : vals).forEach((item,idx) => {
177+
(animationData[prop].length >= vals.length ? animationData[prop] : vals).forEach((item, idx) => {
176178
if (animationData[prop][idx] && vals[idx]) {
177179
animationData[prop][idx] = vals[idx]
178180
} else if (vals[idx]) {
179181
animationData[prop].push(vals[idx])
180182
}
181183
})
182184
} else {
183-
console.error(prop, vals, 999333)
185+
// console.error(prop, vals, 999333)
184186
animationData[prop] = vals
185187
}
186188
})
187-
console.error('animation style, ', vals)
189+
// console.error('animation style, ', vals)
188190
} else {
189191
const vals = (cssProp === 'transition' ? parseTransitionSingleProp(parseValues(value, ','), propName) : parseAnimationSingleProp(parseValues(value, ','), propName)).reduce((acc, { prop, value }) => {
190192
acc.push(value)
191193
return acc
192194
}, [])
193-
console.error(`${propName} style, `, vals)
195+
// console.error(`${propName} style, `, vals)
194196
if (animationData[propName]?.length) {
195-
(animationData[propName].length >= vals.length ? animationData[propName] : vals).forEach((item,idx) => {
197+
(animationData[propName].length >= vals.length ? animationData[propName] : vals).forEach((item, idx) => {
196198
if (animationData[propName][idx] && vals[idx]) {
197199
animationData[propName][idx] = vals[idx]
198200
} else if (vals[idx]) {

packages/webpack-plugin/lib/runtime/components/react/animationHooks/useCssAnimationHooks.ts

Lines changed: 0 additions & 344 deletions
This file was deleted.

0 commit comments

Comments
 (0)