123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <template>
- <div class="show" :style="{ zoom: zoom }">
- <div class="card" :class="item.modelName">
- <div class="logo">
- <img v-if="item.logoImagePath" :src="item.logoImagePath" alt="" />
- </div>
- <div class="member">{{ item.projectName === '' ? 'xxxx' : item.projectName }}</div>
- <div class="number">{{ nftItemId === '' ? '0000' : nftItemId }}</div>
- </div>
- <img class="bg" :src="item.modelImagePath" />
- </div>
- </template>
- <script setup>
- import { onBeforeMount, defineProps, ref } from 'vue'
- const zoom = ref(1);
- const props = defineProps({
- item: {
- type: Object,
- default: {},
- },
- nftItemId: {
- type: String,
- default: '0000',
- },
- width: {
- type: Number,
- default: 400
- }
- })
- onBeforeMount(() => {
- if (props.width) {
- zoom.value = props.width / 400
- }
- })
- </script>
- <style lang='scss' scoped>
- .show {
- position: relative;
- overflow: hidden;
- width: 400px;
- height: 400px;
- .card {
- position: absolute;
- left: 53px;
- top: 103px;
- width: 294px;
- height: 186px;
- .logo {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 100px;
- height: 100px;
- border-radius: 50%;
- background-color: #fff;
- img {
- width: 100%;
- height: 100%;
- border-radius: 50%;
- object-fit: cover;
- }
- }
- .member {
- position: absolute;
- top: 11px;
- left: 11px;
- width: 228px;
- font-size: 12px;
- text-align: left;
- font-weight: 800;
- line-height: 13px;
- }
- .number {
- position: absolute;
- top: 11px;
- right: 10px;
- font-size: 12px;
- font-weight: 800;
- line-height: 13px;
- letter-spacing: 1px;
- }
- &.s1 {
- .member, .number {
- color: #ffffff;
- }
- }
- &.s2 {
- .member, .number {
- color: #4AC3E1;
- }
- }
- &.s3 {
- .member, .number {
- color: #606C94;
- }
- }
- &.s4 {
- .member, .number {
- color: #504215;
- }
- }
- }
- .bg {
- width: 100%;
- height: 100%;
- }
- }
- </style>
|