我正在尝试将图像添加到img-src=""BoostrapVue 中 b-carousel 的属性。该图像当前保存在 asset 文件夹中。
<b-carousel-slide img-src="../assets/life.jpg">
<h1>Hello world!</h1>
</b-carousel-slide>
I have added
Find below images of the result:
I am certain the images are correctly saved in the right location:
如果使用带有 webpack 的加载器(即 vue-loader、url-loader 等),您需要确保加载器知道img-src
接受 URL。
请参阅有关如何告诉加载器处理自定义组件上的 URL props 的信息的文档:https://bootstrap-vue.js.org/docs/reference/images https://bootstrap-vue.js.org/docs/reference/images(特别是 Vue 加载器transformAssetUrls
)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)