通过img标签引入图片路径,
图片的图路径是统一放在数组中的如下
commodity_list:[
{id:1,picture:'../../../../public/common/img1.png',name:'苹果Iphone12',price:1223.0},
{id:2,picture:'../../../../public/common/img1.png',name:'苹果Iphone12',price:1223.0},
{id:3,picture:'../../../../public/common/img1.png',name:'苹果Iphone12',price:1223.0},
{id:4,picture:'../../../../public/common/img1.png',name:'苹果Iphone12',price:1223.0},
{id:5,picture:'../../../../public/common/img1.png',name:'苹果Iphone12',price:1223.0},
{id:6,picture:'../../../../public/common/img1.png',name:'苹果Iphone12',price:1223.0},
{id:7,picture:'../../../../public/common/img1.png',name:'苹果Iphone12',price:1223.0},
{id:8,picture:'../../../../public/common/img1.png',name:'苹果Iphone12',price:1223.0}
]
有什么办法可以拿到正确的路径,通过 import 这个我会,还有没有别的方式可以拿到的,哪位大佬知道。