1 | import { ComponentType } from 'react'
|
2 | import { StandardProps } from './common'
|
3 | interface AnimationViewProps extends StandardProps {
|
4 | /** 动画资源地址,目前只支持绝对路径
|
5 | * @supported swan
|
6 | */
|
7 | path?: string
|
8 | /** 动画是否循环播放
|
9 | * @supported swan
|
10 | * @default false
|
11 | */
|
12 | loop?: boolean
|
13 | /** 动画是否自动播放
|
14 | * @supported swan
|
15 | * @default true
|
16 | */
|
17 | autoplay?: boolean
|
18 | /** 动画操作,可取值 play、pause、stop
|
19 | * @supported swan
|
20 | * @default "play"
|
21 | */
|
22 | action?: 'play' | 'pause' | 'stop'
|
23 | /** 是否隐藏动画
|
24 | * @supported swan
|
25 | * @default true
|
26 | */
|
27 | hidden?: boolean
|
28 | /** 当播放到末尾时触发 ended 事件(自然播放结束会触发回调,循环播放结束及手动停止动画不会触发)
|
29 | * @supported swan
|
30 | */
|
31 | onEnded?: CommonEventFunction
|
32 | }
|
33 | /** Lottie 动画
|
34 | * @classification media
|
35 | * @supported swan
|
36 | * @see https://smartprogram.baidu.com/docs/develop/component/animation-view-Lottie/
|
37 | */
|
38 | declare const AnimationView: ComponentType<AnimationViewProps>
|
39 | export { AnimationView, AnimationViewProps }
|