12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <script setup lang="ts">
- import Card from '@/components/card.vue'
- import dayjs from 'dayjs'
- import used from '@designer-hub/assets/src/libs/assets/used'
- const props = withDefaults(
- defineProps<{
- option?: {
- materialId: number
- couponImgUrl: any
- materialsName: string
- validityStartDate: number
- validityEndDate: number
- brandPoints: number
- }
- canSelect?: boolean
- selected?: boolean
- }>(),
- {
- canSelect: false,
- selected: false,
- },
- )
- </script>
- <template>
- <div
- class="mx-3.5 p-4 bg-[rgba(255,255,255,0.7)] rounded-2xl shadow-[0px_5px_8px_0px_rgba(21,3,3,0.03)]"
- >
- <div class="relative">
- <div class="flex gap-3">
- <div class="w-[68px] h-[68px] bg-[#f6f6f6] rounded-2.5 overflow-hidden">
-
-
-
- {{ options.brandPoints }
-
-
-
-
-
- <wd-img width="100%" height="100%" :src="option.couponImgUrl"></wd-img>
-
- </div>
- <div class="flex-1 flex flex-col justify-around">
- <div class="flex items-center gap-1">
- <div
- class="px-[3px] rounded border border-solid border-[#ff3636] justify-center items-center gap-2.5 inline-flex shrink-0"
- >
- <div
- class="text-[#ff3e3e] text-[10px] font-normal font-['PingFang_SC'] leading-normal "
- >
- {{ option.materialsName }}
- </div>
- </div>
- <div class="text-black text-sm font-normal font-['PingFang_SC'] leading-normal overflow-hidden whitespace-nowrap text-ellipsis">
-
- {{ option.couponName }}
- </div>
- </div>
- <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal">
-
-
- {{ dayjs(option.validityStartDate).format('YYYY/MM/DD') }}-{{
- dayjs(option.validityEndDate).format('YYYY/MM/DD')
- }}
- </div>
-
-
-
-
-
-
-
- </div>
- <div class="flex items-center" v-if="canSelect">
- <div
- class="w-4 h-4 rounded-full border border-black/60 border-solid"
- :class="`${selected ? 'bg-black' : ''}`"
- ></div>
- </div>
- </div>
- <div class="absolute top--4 right--4">
- <wd-img width="58" height="58" :src="used"></wd-img>
- </div>
- </div>
- </div>
- </template>
|