【坑】VUE中动态数据使用 wow.js 没效果的问题

贲风 / 2023-09-05 / 原文

一般来说正常使用都是在mounted 函数中

mounted() {
    this.$nextTick(() => {
         this.$wow.init()
    })
}

这样如果是死数据是可以正常出现效果的 但是如果是请求回来的数据是没有效果的

需要改一下生成时机    此处的newList 即为请求的数据

watch: {
    newslist () {
      this.$nextTick(()=>{
           this.$wow.init()
      })
    }
}

这样即可