diff --git a/src/packages/loading/demos/taro/demo1.tsx b/src/packages/loading/demos/taro/demo1.tsx index 191165dfdf..d1306dcfb2 100644 --- a/src/packages/loading/demos/taro/demo1.tsx +++ b/src/packages/loading/demos/taro/demo1.tsx @@ -25,7 +25,7 @@ const Demo1 = () => { type="lottie" jsonData={data} lottieProps={{ - autoplay: false, + autoPlay: false, loop: false, style: { width: 56, height: 56 }, }} diff --git a/src/packages/lottie/mp.taro.tsx b/src/packages/lottie/mp.taro.tsx index 57ef4d9aa3..2109298746 100644 --- a/src/packages/lottie/mp.taro.tsx +++ b/src/packages/lottie/mp.taro.tsx @@ -1,11 +1,11 @@ import React, { useImperativeHandle, useRef } from 'react' import { createSelectorQuery, + getEnv, getSystemInfoSync, useReady, useUnload, } from '@tarojs/taro' -import { Canvas } from '@tarojs/components' import lottie from 'lottie-miniprogram' import useUuid from '@/utils/use-uuid' import { LottieProps } from './types' @@ -82,7 +82,28 @@ export const Lottie = React.forwardRef((props: LottieProps, ref: any) => { animation.current.removeEventListener('complete', onComplete) animation.current && animation.current.destroy() }) - return + + return getEnv() === 'WEAPP' || getEnv() === 'JD' ? ( + + ) : ( + + ) }) Lottie.displayName = 'NutLottie' diff --git a/src/packages/pulltorefresh/pulltorefresh.taro.tsx b/src/packages/pulltorefresh/pulltorefresh.taro.tsx index c98e8b58f0..10f96811d4 100644 --- a/src/packages/pulltorefresh/pulltorefresh.taro.tsx +++ b/src/packages/pulltorefresh/pulltorefresh.taro.tsx @@ -176,6 +176,7 @@ export const PullToRefresh: FunctionComponent> = (