const loadImages = () => {
const images = import.meta.glob('你的图片路径/*.png');
// 遍历匹配到的图片,批量导入
iconList.value = Object.keys(images).map(key => new URL(key, import.meta.url).href);
};
vue3+vite从本地批量引入图片
于 2024-05-16 15:10:05 首次发布