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

118 lines
2.1 KiB
Vue

<template>
<div class="summary9">
<div class="summary9-item" v-for="(item, index) in data" :key="index">
<h2>{{ item[key] }}</h2>
<p>{{ item[value] }}</p>
<i></i>
<div>
<span>{{ item.text }}</span>
<i :style="{color: item.percentage < 0 ? '#FCD25D' : '#1BB249'}">{{ item.percentage > 0 ? '+' + item.percentage : item.percentage }}</i>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'summary9',
props: {
data: {
type: Array,
default: () => []
},
key: {
type: String,
default: 'keys'
},
value: {
type: String,
default: 'value'
},
text: {
type: String,
default: '同比上月'
},
percentage: {
type: String,
default: 'percentage'
}
},
data () {
return {
}
}
}
</script>
<style lang="scss" scoped>
.summary9 {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
width: 100%;
div {
box-sizing: border-box;
}
.summary9-item {
display: flex;
position: relative;
align-items: center;
flex-direction: column;
width: 132px;
height: 160px;
padding-top: 32px;
background-image: url(../asset/summary9-bg.svg);
background-size: 100% 100%;
div {
display: flex;
align-items: center;
margin-top: 8px;
line-height: 20px;
span {
color: #B6DFFF;
font-size: 12px;
}
i {
color: #1BB249;
font-size: 12px;
font-style: normal;
}
}
& > i {
width: 60px;
height: 1px;
margin: 0 auto;
background: #0A91FB;
}
h2 {
line-height: 27px;
color: #0A91FB;
font-size: 14px;
}
p {
line-height: 35px;
margin: 0 0 4px;
font-size: 32px;
font-weight: 700;
color: #fff;
}
}
}
</style>