diff --git a/packages/f-engine/src/index.ts b/packages/f-engine/src/index.ts index c0c20b6..938dc84 100644 --- a/packages/f-engine/src/index.ts +++ b/packages/f-engine/src/index.ts @@ -1,5 +1,6 @@ import { computeLayout } from './canvas/render'; import { Renderer as CanvasRenderer } from '@antv/g-mobile-canvas'; +import { parseColor } from '@antv/g-lite'; import * as Smooth from './shape/util/smooth'; export { JSX } from './jsx/jsx-namespace'; @@ -13,7 +14,7 @@ export { default as createRef } from './createRef'; export { default as createContext } from './createContext'; export { default as Timeline, TimelineProps } from './timeline'; export { default as Gesture } from './gesture'; -export { CanvasRenderer, computeLayout, Smooth }; +export { CanvasRenderer, computeLayout, Smooth, parseColor }; export { default as isEqual } from './canvas/equal'; export { default as Player, PlayerProps } from './player'; diff --git a/packages/f-engine/test/timeline/keyFrames.test.tsx b/packages/f-engine/test/timeline/keyFrames.test.tsx index 527bc2c..0b73599 100644 --- a/packages/f-engine/test/timeline/keyFrames.test.tsx +++ b/packages/f-engine/test/timeline/keyFrames.test.tsx @@ -397,8 +397,8 @@ describe('player', () => { await delay(800); const shape = canvas.container.childNodes[1].childNodes[0].childNodes[0]; - //@ts-ignore - expect(Number(shape.style.width)).toBeGreaterThan(10); + //@ts-ignore 初始状态10px = 5 + expect(Number(shape.style.width)).toBeGreaterThan(5); }); it('播放中finish', async () => {