zyronon/douyin

图文组件SlideAlbum.vue加载时无法获取到class="img-slide-list"的宽度

zhongke-wang opened this issue · 1 comments

引入import { nextTick } from "vue";

onMounted进行以下改写得到解决

onMounted(async () => {
  await nextTick()
  // ...原onMounted中的代码
})

好的,谢谢