嗨,我是 buefy 和 vuejs 的新手,我的 json 数组中有不同的 url,需要在 buefy 轮播中显示,但是每当我使用模板 slot="indicators" 时,图像都会显示损坏的图像。已显示图像,但在模板 slot="indicators" 中显示损坏的图像。有人能帮我吗?谢谢
这是代码:
<b-carousel :indicator-inside="false">
<b-carousel-item v-for="(itemss,i) in imgsplit" v-bind:prop="itemss" v-bind:key="i">
<span class="image">
<img v-bind:src="getImgUrl(imgsplit[i])" />
</span>
</b-carousel-item>
<template slot="indicators" slot-scope="props">
<span class="al image">
<img :src="props.i" :title="props.i" />
</span>
</template>
</b-carousel>
方法
// ...
getImgUrl(value) {
return value
},
// ...
JSON数组示例
[
'https://image.shutterstock.com/image-photo/mountain-landscape-lake-range-large-260nw-1017466240.jpg',
'https://i.pinimg.com/originals/da/1b/73/da1b7357ff266888dd43b84e9162731b.jpg',
]