效果图:(都是图片,图片数组)
直接拷贝,然后换一下图就能用
<template>
<img v-for="(i,index) in 5" :key="index" :src="getAssetsImages(index)" alt="">
</template>
<script lang='ts'>
export default {
name: "serviceStandard",
setup(){
const getAssetsImages = (index: number) => {
return new URL(`/src/assets/hourService/myOrder/serviceStandard/0${index}.png`, import.meta.url).href
}
return{
getAssetsImages
}
}
}
</script>
<style scoped>
img{
width: 100%;
margin-top: -7px;
}
</style>