搜索结果列表页面开发
This commit is contained in:
32
src/components/Setting/ImgRadio/Index.vue
Normal file
32
src/components/Setting/ImgRadio/Index.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
const emit = defineEmits<{(e: 'update:modelValue', selected: string): void }>();
|
||||
|
||||
const props = defineProps<{
|
||||
src: string;
|
||||
alt: string;
|
||||
modelValue: string;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="image-radio">
|
||||
<div class="border-b border-G300"><img :src="src" :alt="alt" /></div>
|
||||
<div class="w-full flex px-5 py-3">
|
||||
<d-radio
|
||||
:modelValue="props.modelValue"
|
||||
@update:modelValue="(v: string) => emit('update:modelValue', v)"
|
||||
:value="alt"
|
||||
>{{ alt }}</d-radio
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
img {
|
||||
width: 320px;
|
||||
height: 225px;
|
||||
object-fit: contain;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user