1.在img标签里面直接写上路径:
<div>
<!-- 两种写法均可 -->
<img src="@/assets/imgs/0.jpg" alt="" width="150px" style="margin-right:10px;">
<img src="../assets/imgs/0.jpg" alt="" width="150px">
</div>
注释:@指的是src
1.在js中写入图片路径:
错误引入方式:
img:[’…/assets/imgs/0.jpg’,’…/assets/imgs/1.jpg’,’…/assets/imgs/2.jpg’]
显示效果如下图: