diff --git a/src/packages/lottie/index.taro.ts b/src/packages/lottie/index.taro.ts index 5cd7859b3e..6c070ddf0d 100644 --- a/src/packages/lottie/index.taro.ts +++ b/src/packages/lottie/index.taro.ts @@ -5,11 +5,16 @@ import { LottieProps } from './types' let implementation if (process.env.TARO_ENV === 'h5') { + // @ts-ignore implementation = LottieWeb } else if (process.env.TARO_ENV === 'weapp') { + // @ts-ignore implementation = LottieMp } else { - throw new Error(`不支持的 TARO_ENV: ${process.env.TARO_ENV}`) + // throw new Error(`不支持的 TARO_ENV: ${process.env.TARO_ENV}`) + implementation = (props: any) => { + return props.children + } } const Lottie: ComponentType> = implementation as any export default Lottie