-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
function LayerComp() {
const [animdata, setAnimdata] = useState(null);
useEffect(() => {
$.getJSON('https://h5ds-cdn.oss-cn-beijing.aliyuncs.com/other/lottie/data.json').done(res => {
setAnimdata(res);
})
}, [])
return <>
{animdata && (
<Lottie
options={{
assetsPath: 'https://h5ds-cdn.oss-cn-beijing.aliyuncs.com/other/lottie/images',
animationData: animdata,
speed: 1, // 速度
autoplay: true,
renderer: 'svg',
loop: true
}}
/>)}
</>
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
