更新脚手架!
This commit is contained in:
20
src/data/imgList.js
Normal file
20
src/data/imgList.js
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
const load = [
|
||||
'load/1.png',
|
||||
]
|
||||
|
||||
// 处理为vite引入图片格式
|
||||
function imgCreate(url, img) {
|
||||
let i = new URL(`../assets/images/${url}`, import.meta.url).href
|
||||
img.push(i)
|
||||
}
|
||||
|
||||
|
||||
const loadImg = []
|
||||
const pageImg = []
|
||||
|
||||
load.forEach(element => {
|
||||
imgCreate(element, loadImg)
|
||||
});
|
||||
|
||||
export { loadImg, pageImg }
|
||||
Reference in New Issue
Block a user