This commit is contained in:
lucashu 2025-08-21 09:19:33 +08:00
parent 6dc82e8f77
commit a9ba6c5f56
4 changed files with 21 additions and 26 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

View File

@ -3,12 +3,14 @@
{
"label": "场景总数",
"value": 264,
"color": "#00E5FF"
"color": "#00E5FF",
"image": "scene-total.png"
},
{
"label": "智控场景",
"value": 264,
"color": "#FFD700"
"color": "#FFD700",
"image": "scene-control.png"
}
]
}

View File

@ -11,9 +11,7 @@
<div v-for="(item, index) in option.dataset" :key="index" class="scene-item">
<div class="item-label" :style="{ color: option.labelColor, fontSize: option.labelSize + 'px' }">{{ item.label }}</div>
<div class="cube-container">
<div class="cube-image" :style="{ '--glow-color': item.color }">
<svg-icon icon-class="camera" class="camera-icon"></svg-icon>
</div>
<img :src="getImageUrl(item.image)" class="cube-image" />
</div>
<div class="item-value" :style="{ color: option.valueColor, fontSize: option.valueSize + 'px' }">{{ item.value }}</div>
</div>
@ -33,6 +31,10 @@ const props = defineProps({
})
const option = computed(() => props.chartConfig.option)
const getImageUrl = (name: string) => {
return new URL(`./assets/${name}`, import.meta.url).href
}
</script>
<style lang="scss" scoped>
@ -49,10 +51,12 @@ const option = computed(() => props.chartConfig.option)
display: flex;
justify-content: space-between;
align-items: center;
background-color: #1A385A;
padding: 5px 15px;
background: linear-gradient(to right, #1A385A, #2A588A, #1A385A);
border: 1px solid #00E5FF;
border-radius: 5px;
padding: 5px 15px;
margin-bottom: 20px;
box-shadow: 0 0 10px #00E5FF;
.title {
display: flex;
@ -89,36 +93,25 @@ const option = computed(() => props.chartConfig.option)
.cube-container {
position: relative;
width: 120px;
height: 120px;
width: 150px;
height: 150px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20px;
.cube-image {
width: 80px;
height: 80px;
border: 2px solid var(--glow-color);
background-color: rgba(var(--glow-color), 0.1);
box-shadow: 0 0 15px var(--glow-color);
display: flex;
align-items: center;
justify-content: center;
.camera-icon {
font-size: 40px;
color: var(--glow-color);
}
width: 100%;
height: 100%;
object-fit: contain;
}
}
.item-value {
font-weight: bold;
background: #2A3A5B;
padding: 5px 20px;
border-radius: 5px;
font-family: 'DS-Digital', 'Arial', sans-serif;
text-shadow: 0 0 10px #00E5FF;
}
}
}
</style>
</style>