sq652366
<template>
  <div>
    <lottie
      :options="defaultOptions"
      :height="400"
      :width="400"
      v-on:animCreated="handleAnimation"
    />
    <div>数字</div>
  </div>
</template>

 

<script>
  import Lottie from \'vue-lottie\' //第三方插件
  import * as animationData from \'./assets/data.json\' //需要展示的json动画
  export default {
    components: {
      lottie: Lottie, //注册动画组件
    },
    data() {
      return {
        defaultOptions: { animationData: animationData.default },
      }
    },
    methods: {
      handleAnimation: function (anim) {
        this.anim = anim
      },
    },
}
</script>
//josn 文件是ui 将动画图转出的 

分类:

技术点:

相关文章:

  • 2021-11-27
  • 2021-08-17
  • 2021-07-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2021-11-17
  • 2022-01-21
  • 2021-10-19
  • 2021-07-05
相关资源
相似解决方案