代码更改前
<img class="img" :src="`@/assets/images/${syntheticalGrade}.png`" />data(){return{syntheticalGrade:"1"}
}
效果图:
解决代码
<img class="img" :src="require(`@/assets/images/${syntheticalGrade}.png`)" />data(){return{syntheticalGrade:"1"}
}
效果图: