1
<img :src="getImage()" alt="">
const getImage = () => {
return new URL(`../../assets/1.png`, import.meta.url).href;
}
2
<img :src="img" alt="">
import img from "@/assets/2.png";
1
<img :src="getImage()" alt="">
const getImage = () => {
return new URL(`../../assets/1.png`, import.meta.url).href;
}
2
<img :src="img" alt="">
import img from "@/assets/2.png";