vant-ui / vant-nuxt

Vant module for Nuxt
MIT License
78 stars 9 forks source link

Image组件,当src不存在或者src错误的情况下,我使用了error插槽,但是结果还是加载中的样式 #17

Closed YTaoger closed 1 year ago

YTaoger commented 1 year ago
<van-image>
  <template #loading>
    <p>图片加载中</p>
  </template>
  <template #error>
     <p>图片加载失败</p>
  </template>
</van-image>

期望结果:当图片路径不存在或者路径错误时,应该显示error插槽内的内容,而不是loading插槽内的内容

tolking commented 1 year ago

这属于vant的默认行为。请前往 vant