nuxt生产环境报错 Failed to execute ‘appendChild‘ on ‘Node‘: This node type does not support this method.
nuxt发布到生产环境后,报错Failed to execute ‘appendChild’ on ‘Node’: This node type does not support this method. 导致页面js 失效一路排查下来发现使用的轮播插件里面。video 和img 没有用 div 包裹。
·
nuxt生产环境报错 Failed to execute 'appendChild' on 'Node': This node type does not support this method.
nuxt 发布到生产环境后,报错 Failed to execute ‘appendChild’ on ‘Node’: This node type does not support this method. 导致页面js 失效 一路排查下来发现使用的轮播插件里面
//
<swiper :options="mySwiperOption" id="my-swiper2" class="stop-swiping">
<swiper-slide v-for="(item,index) in imgList" :key="index" :class="item.className">
<video
:src="item.videoUrl"
class="video"
muted
preload="meta"
autoplay
loop
>
</video>
<img :src="item.url"/>
</swiper-slide>
</swiper>
video 和 img 没有用 div 包裹
解决
// A code block
<swiper :options="mySwiperOption" id="my-swiper2" class="stop-swiping">
<swiper-slide v-for="(item,index) in imgList" :key="index" :class="item.className">
<div>
<video
:src="item.videoUrl"
class="video"
muted
preload="meta"
autoplay
loop
>
</video>
<img :src="item.url"/>
</div>
</swiper-slide>
</swiper>
更多推荐


所有评论(0)