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

79 lines
1.3 KiB
Vue
Raw Permalink 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-02-06 17:21:49 +08:00
<span v-text="item[value]" :unit="item.unit"/>
2024-01-15 19:56:05 +08:00
</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;
2024-02-06 17:21:49 +08:00
display: flex;
justify-content: space-between;
flex-wrap: wrap;
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 {
2024-02-06 17:21:49 +08:00
width: 48%;
2024-02-06 17:16:31 +08:00
display: grid;
2024-02-06 17:23:42 +08:00
grid-template-columns: 2fr 1fr;
2024-01-15 19:56:05 +08:00
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-02-06 17:21:49 +08:00
&:after {
content: attr(unit);
font-size: 14px;
}
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
}
}
</style>