127 lines
2.2 KiB
Vue
127 lines
2.2 KiB
Vue
<template>
|
|
<div class="basic-info-card">
|
|
<div class="robot-image">
|
|
<img :src="robotImage" alt="机器人图片" />
|
|
</div>
|
|
<div class="info-list">
|
|
<div class="info-item" v-for="(item, index) in infoItems" :key="index">
|
|
<div class="info-label">{{ item.label }}</div>
|
|
<div class="info-value textjb " :class="item.status">{{ item.value }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
const props = defineProps({
|
|
robotImage: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
infoItems: {
|
|
type: Array,
|
|
required: true
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<style scoped>
|
|
.basic-info-card {
|
|
display: flex;
|
|
padding: 10px;
|
|
width: 100%;
|
|
min-width: 140px;
|
|
|
|
}
|
|
|
|
.robot-image {
|
|
flex-shrink: 0;
|
|
/* margin-right: 20px; */
|
|
padding: 4px 2px;
|
|
width: 140px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
background: url("../../assets/img/border_img.png") no-repeat;
|
|
background-size: 100% 100%;
|
|
}
|
|
|
|
.robot-image img {
|
|
max-width: 100%;
|
|
max-height: 100%;
|
|
display: block;
|
|
|
|
}
|
|
|
|
.info-list {
|
|
flex-grow: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-around;
|
|
color: #a0aec0;
|
|
padding: 0 10px;
|
|
/* background: linear-gradient(to bottom, #00273A 10%, #00273A 80%); */
|
|
/* border:1px solid red; */
|
|
}
|
|
|
|
.info-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 10px 0;
|
|
border-bottom: 1px solid #1f3a52;
|
|
font-size: 18px;
|
|
}
|
|
|
|
.info-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.info-label {
|
|
display: flex;
|
|
align-items: center;
|
|
color: #c0cdc9;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.info-label::before {
|
|
content: "";
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 8px;
|
|
background: url("../../assets/img/bt.png");
|
|
background-size: 100% 100%;
|
|
border-radius: 50%;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.info-value {
|
|
font-size: 16px;
|
|
}
|
|
|
|
/* @media (max-width: 640px) {
|
|
.basic-info-card {
|
|
flex-direction: column;
|
|
width: 90%;
|
|
max-width: 400px;
|
|
min-width: unset;
|
|
}
|
|
.robot-image {
|
|
width: 100%;
|
|
height: 200px;
|
|
margin-right: 0;
|
|
margin-bottom: 20px;
|
|
}
|
|
.robot-image img {
|
|
object-fit: contain;
|
|
}
|
|
.info-item {
|
|
font-size: 16px;
|
|
}
|
|
.info-label,
|
|
.info-value {
|
|
font-size: 16px;
|
|
}
|
|
} */
|
|
</style> |