gpt4 book ai didi

javascript - 如何在 Vue js 中在线引用图片?

转载 作者:搜寻专家 更新时间:2023-10-30 22:32:39 26 4
gpt4 key购买 nike

我有这样的东西:

<img class="product_image" src="{{ product.Image_url }}">

product.Image_url引用了我的数据库,该数据库的图像 URL 类似于 https://hackernoon.com/hn-images/1*YNBTPaCNBNWLoT7XAbJ1Lw.png .这段代码给了我一个 Failed to load resource: the server responded with a status of 404 (Not Found)错误。我不确定我在这里做错了什么。

非常感谢这方面的帮助。

谢谢!

最佳答案

如果图像 https://something.com/something.png 确实存在(将 url 粘贴到浏览器地址栏以确保您可以加载 Assets )然后试试这个:

<img class="product_image" :src="product.Image_url">

关于javascript - 如何在 Vue js 中在线引用图片?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58079899/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com