/** vite的特殊性, 需要处理图片 */ export const require = (imgPath) => { try { const handlePath = imgPath.replace('@', '..') return new URL(handlePath, import.meta.url).href } catch (error) { console.warn(error) } }