diff --git a/src/components/ui/VnImg.vue b/src/components/ui/VnImg.vue index 6a459020..fb468dc1 100644 --- a/src/components/ui/VnImg.vue +++ b/src/components/ui/VnImg.vue @@ -28,13 +28,9 @@ const props = defineProps({ type: Number, required: true }, - rounded: { - type: Boolean, - default: false - }, - fullRounded: { - type: Boolean, - default: false + roundedBorders: { + type: String, + default: 'none' }, width: { type: String, @@ -70,6 +66,17 @@ const showEditForm = ref(false); const url = computed(() => { return `${props.baseURL ?? app.imageUrl}/${props.storage}/${props.size}/${props.id}`; }); + +const rounded = computed(() => { + const roundedMap = { + none: '', + default: 'rounded', + full: 'full-rounded', + top: 'top-rounded', + bottom: 'bottom-rounded' + }; + return roundedMap[props.roundedBorders]; +});