animation-view
Lottie 动画 GitCode GitHub
本 Component 是 uni ext component,需下载插件:animation-view
兼容性
Web | 微信小程序 | Android | iOS | HarmonyOS |
x | x | 3.9 | 4.11 | 4.61 |
标准基座并不包含本插件,下载插件后需编写调用代码并打包自定义基座才可运行。
属性
名称 | 类型 | 默认值 | 兼容性 | 描述 |
path | string | "" |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| x | x | 3.9 | 4.11 | - |
| 动画资源地址,目前只支持绝对路径 |
loop | boolean | false |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| x | x | 3.9 | 4.11 | - |
| 动画是否循环播放 |
autoplay | boolean | false |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| x | x | 3.9 | 4.11 | - |
| 动画是否自动播放 |
action | string | "stop" |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| x | x | 3.9 | 4.11 | - |
| 动画操作,可取值 play、pause、stop |
合法值 | 兼容性 | 描述 | play |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| x | x | 3.9 | 4.11 | - |
| 播放 | pause |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| x | x | 3.9 | 4.11 | - |
| 暂停 | stop |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| x | x | 3.9 | 4.11 | - |
| 停止 |
|
hidden | boolean | false |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| x | x | 3.9 | 4.11 | - |
| 是否隐藏动画 |
@ended | (event: UniEvent) => void | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| x | x | 3.9 | 4.11 | - |
| - |
不可以嵌套组件
参见