The man who has made up his mind to win will never say “impossible”.
The man who has made up his mind to win will never say “impossible”.
除了static文件夹,图片放在其他文件夹都会被webpack构建,如改成base64的格式。因此js就会找不到图片路径。
因此,如果要正确引入图片有以下几种方法
icon:('image://'+require("../../../assets/images/driveless/right/right_img7.png")+'')
icon:('image://../../../../static/images/driveless/right/right_img7.png'
import imgSrc2 from "../../../assets/images/driveless/right/right_img7.png";
...
icon:('image://'+imgSrc2+'')
...
三种方法均能成功展示。
评论没有加载,检查你的局域网
Cannot load comments. Check you network.