参考 Vite 官网的说明,修改图片的引用路径后,图片发布后可以正常显示
const imgUrl = new URL('./img.png', import.meta.url).href document.getElementById('hero-img').src = imgUrl
官网地址: https://cn.vitejs.dev/guide/assets.html
标签:img,vie,相对路径,vue3,官网,imgUrl,图片 From: https://www.cnblogs.com/SuperJason/p/17639695.html