微信小程序使用lottie

import lottie from 'lottie-miniprogram'

onReady: function () {

    wx.createSelectorQuery().select('#canvas').node(res => {



        const canvas = res.node

        const context = canvas.getContext('2d')



        lottie.setup(canvas)


        lottie.loadAnimation({

            // loop: true,

            autoplay: true,

            path: "http://192.168.1.15:80/test01.json",

            rendererSettings: {

                context

            }

        })

    }).exec()

},

 

你可能感兴趣的:(微信小程序使用lottie)