web123456

Load json file using lottie animation in Vue

//Introduce animation json import * as animationData from '../../../../assets/json/icon_loading_mirror.json' <lottie :options="defaultOptions" :height="100" :width="100" /> export default{ ... components:{ lottie } ... } data() { return { defaultOptions: { animationData: animationData, renderer: 'svg', // Rendering method, svg, canvas, html (lightweight version only renders svg) loop: true, // Whether to play loop, true means loop, false means not loop autoplay: true, // Whether to play automatically, true means to play automatically} }, } },