Files
dvcp_v2_webapp/components/layout/AiDvSummary/components/Summary19.vue

76 lines
1.2 KiB
Vue
Raw Normal View History

2024-01-15 19:56:05 +08:00
<template>
<div class="summary19">
<div class="summary19-item" v-for="(item, index) in data" :key="index" v-if="index < 4">
2024-02-05 17:05:43 +08:00
<div class="label" v-text="item[keys]"/>
2024-01-15 19:56:05 +08:00
<span v-text="item[value]"/>
<p v-if="item.unit" v-text="item.unit"/>
</div>
</div>
</template>
<script>
export default {
name: 'summary19',
props: {
data: {
type: Array,
default: () => []
},
keys: {
type: String,
default: 'key'
},
value: {
type: String,
default: 'value'
}
},
}
</script>
<style lang="scss" scoped>
$theme-color: #23ECFD;
.summary19 {
2024-02-06 17:08:29 +08:00
padding: 22px 14px;
2024-01-15 19:56:05 +08:00
background: hsla(0, 0%, 100%, .04);
margin: -16px 16px auto;
display: grid;
grid-template-columns: repeat(2, 1fr);
2024-02-06 17:10:18 +08:00
font-size: 14px;
2024-01-15 19:56:05 +08:00
div {
box-sizing: border-box;
}
.summary19-item {
display: flex;
align-items: baseline;
gap: 4px;
span {
font-family: D-DIN;
2024-02-06 17:10:18 +08:00
font-size: 22px;
2024-01-15 19:56:05 +08:00
color: $theme-color;
2024-02-05 17:05:43 +08:00
min-width: 60px;
margin-left: 8px;
2024-01-15 19:56:05 +08:00
}
p {
color: $theme-color;
}
2024-02-05 17:05:43 +08:00
.label {
color: white;
text-align: right;
}
2024-01-15 19:56:05 +08:00
&:nth-of-type(2n) {
justify-self: flex-end;
}
}
}
</style>