108 lines
2.2 KiB
Plaintext
108 lines
2.2 KiB
Plaintext
<script setup lang="ts">
|
|
const props = defineProps({
|
|
title: String,
|
|
subTitle: String,
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div class="block-wrapper">
|
|
<div class="block_title" v-if="props.title">{{ props.title }}</div>
|
|
<div class="block_sub-title" v-if="props.subTitle">{{ props.subTitle }}</div>
|
|
<div class="block_content">
|
|
<slot />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped lang="less">
|
|
.block-wrapper {
|
|
// width: 480px;
|
|
// height: 428px;
|
|
border-radius: 18px;
|
|
overflow: hidden;
|
|
|
|
background-color: #fff;
|
|
border: 1px solid #e7ebf5;
|
|
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: relative;
|
|
|
|
&::after {
|
|
content: ' ';
|
|
background-image: url('@/assets/images/bg-card.svg');
|
|
pointer-events: none;
|
|
display: block;
|
|
width: 100%;
|
|
height: 127px;
|
|
background-repeat: no-repeat; /* 阻止图片平铺 */
|
|
background-position: right top;
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
}
|
|
|
|
.block_title {
|
|
flex-shrink: 0;
|
|
font-size: 28px;
|
|
color: #132041;
|
|
padding: 20px;
|
|
padding-bottom: 0;
|
|
}
|
|
.block_sub-title {
|
|
color: #808696;
|
|
font-size: 16px;
|
|
padding: 0 20px;
|
|
padding-bottom: 0;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.block_nav {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
width: 276px;
|
|
height: 66px;
|
|
|
|
background-image: url('@/assets/images/bg-card-nav.svg');
|
|
background-position: top right;
|
|
background-repeat: no-repeat;
|
|
background-size: contain;
|
|
|
|
font-size: 20px;
|
|
color: #fff;
|
|
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-end;
|
|
padding-left: 38px;
|
|
padding-right: 22px;
|
|
padding-bottom: 20px;
|
|
|
|
.block_nav_item {
|
|
width: 80px;
|
|
height: 36px;
|
|
text-align: center;
|
|
padding-top: 8px;
|
|
cursor: pointer;
|
|
|
|
&.active {
|
|
color: #032fa0;
|
|
background-image: url('@/assets/images/bg-card-nav-item.svg');
|
|
background-position: bottom;
|
|
background-repeat: no-repeat;
|
|
background-size: contain;
|
|
}
|
|
}
|
|
}
|
|
|
|
.block_content {
|
|
flex: 1;
|
|
height: 0;
|
|
// margin-top: 10px;
|
|
}
|
|
}
|
|
</style>
|