45 lines
980 B
Vue
45 lines
980 B
Vue
<template>
|
|
<div v-if="props.list" class="fiveGrid">
|
|
<div class="rectAdvBox" @click="jumpAdv(item, 'ads')" v-for="item in props.list" :key="item.id">
|
|
<lazyImg class="rectAdvIcon" :src="item.cover" />
|
|
<div class="rectName ellipsis">{{ item.title }}</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script lang="ts" setup>
|
|
import { jumpAdv } from '@/utils/index';
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
list: Types.App.AdsInfoListItem[];
|
|
}>(),
|
|
{
|
|
list: () => [],
|
|
},
|
|
);
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.fiveGrid {
|
|
padding: 18px 0 0;
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
grid-row-gap: 12px;
|
|
grid-column-gap: 10px;
|
|
.rectAdvBox {
|
|
width: 60px;
|
|
.rectAdvIcon {
|
|
height: 60px;
|
|
width: 60px;
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
}
|
|
.rectName {
|
|
font-size: 12px;
|
|
margin-top: 5px;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-align: center;
|
|
}
|
|
}
|
|
}
|
|
</style>
|