mirari / v-viewer

Image viewer component for vue, supports rotation, scale, zoom and so on, based on viewer.js
https://mirari.cc/v-viewer/
MIT License
2.51k stars 295 forks source link

通过直接导入json文件的方式可以预览,但是使用fetch获取就无法预览 #343

Open kkokoo opened 2 months ago

kkokoo commented 2 months ago
kkokoo commented 2 months ago

解决了,删除<viewer></viewer>,改为<div v-viewer><div>


<div v-viewer class="item">
         <span v-for="photo in photosData" :key="photo.title">
                    <img :src="photo.src" :alt="photo.title">
               <p>{{ photo.title }}</p>
        </span>
</div>
<viewer class="item">
         <span v-for="photo in photosData" :key="photo.title">
                    <img :src="photo.src" :alt="photo.title">
               <p>{{ photo.title }}</p>
        </span>
   </viewer>