chore: use reactive props
This commit is contained in:
1 parent
5fd2150beb
commit
6bf5d77a01
8 files changed
+41
-43
No files matched your search
@@ -1,9 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
const props = withDefaults(defineProps<{ src: string; alt?: string }>(), {
|
||||
alt: "",
|
||||
});
|
||||
const { src, alt = "" } = defineProps<{ src: string; alt?: string }>();
|
||||
|
||||
const src = props.src;
|
||||
const imgSrc =
|
||||
src.startsWith("http://") || src.startsWith("https://")
|
||||
? src
|
||||
|
||||
Reference in new issue
Block a user