<div v-for="(item, index) in allMessage" :key="index">
<span :id="'loading_' + index"></span>
</div>
import animationData from "@/assets/loading.json";
import speakingData from "@/assets/speaking.json";
import lottie from "lottie-web";
// json动画
loadAnimationFn() {
var animationLoading
this.$nextTick(() => {
animationLoading = lottie.loadAnimation({
container: document.getElementById("loading_" + (this.allMessage.length - 1)),
renderer: "svg",
loop: true,
autoplay: true,
animationData: animationData,
});
})
},
02-09
2132
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-26
1528
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-17
249
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-15
5672
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)