报错:
[Vue warn]: Failed to mount component: template or render function not defined.
[Vue warn]:未能装入组件:未定义模板或渲染函数。
使用:
import Vue from 'vue'
import lottie from 'lottie-web/build/player/lottie'
Vue.component('lottie',lottie)
//
{ src: "~/plugins/vue-lottie", ssr: false },
<client-only>
<lottie :options="defaultOptions" :width="240" :height="240" v-on:animCreated="handleAnimation">lottie>
client-only>
我寻思着也没啥问题啊,有没有大 哥知道啥原因啊
如果你安装的时候是用这个
npm install lottie-web --save
那按道理你引入组件的时候应该是这样
import lottie from 'lottie-web'
试试
client-only 这个哪来的
client-only这个是代替no-ssr标签的