Files
dvcp_v2_webapp/project/dvui/layout/AiDvSummary/components/Summary0.vue
2022-03-25 11:09:26 +08:00

105 lines
2.0 KiB
Vue

<template>
<div class="summary0">
<div class="summary0-item" v-for="(item, index) in data" :key="index">
<h2>{{ item[value] }}</h2>
<p>{{ item[keys] }}</p>
<div class="corner left-top"></div>
<div class="corner right-top"></div>
<div class="corner left-bottom"></div>
<div class="corner right-bottom"></div>
</div>
</div>
</template>
<script>
export default {
name: 'summary0',
props: {
data: {
type: Array,
default: () => []
},
keys: {
type: String,
default: 'key'
},
value: {
type: String,
default: 'value'
}
},
data () {
return {
}
}
}
</script>
<style lang="scss" scoped>
.summary0 {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
width: 100%;
height: 100%;
.summary0-item {
display: flex;
position: relative;
justify-content: center;
align-items: center;
flex-direction: column;
width: 180px;
height: 100px;
box-shadow: 0 0 14px 10px #0e3a77 inset;
background: transparent;
.corner {
height: 18px;
width: 18px;
position: absolute;
display: block;
background-image: url(../asset/corner.svg);
background-repeat: no-repeat;
}
.corner.left-top {
left: -6px;
top: -6px;
transform: rotateY(180deg);
}
.corner.right-top {
right: -6px;
top: -6px;
}
.corner.left-bottom {
left: -6px;
bottom: -6px;
transform: rotateX(180deg) rotateY(180deg);
}
.corner.right-bottom {
right: -6px;
bottom: -6px;
transform: rotateX(180deg);
}
h2 {
color: #fff;
font-size: 28px;
font-weight: 500;
}
p {
line-height: 24px;
font-size: 16px;
color: #8BCCFF;
}
}
}
</style>