|
|
@ -10,7 +10,11 @@ const props = defineProps({ |
|
|
|
default: () => {}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
const imgUrl = ref(new URL(props.data.path, import.meta.url).href) |
|
|
|
const imgUrl = getAssetsFile(props.data.path) |
|
|
|
// ../assets/imgs为图片公共路径 |
|
|
|
function getAssetsFile(url: string) { |
|
|
|
return new URL(`../../../../assets/${url}`, import.meta.url).href |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<template> |
|
|
|