<script setup>
|
import chartIcon from "./images/chart-icon.png";
|
const props = defineProps({
|
title: {
|
type: String,
|
default: ""
|
}
|
});
|
</script>
|
|
<template>
|
<div class="chart-box-wrapper">
|
<div class="chart-box-header">
|
<div class="chart-box-icon">
|
<img :src="chartIcon" alt="" />
|
</div>
|
<div class="chart-box-title">{{title}}</div>
|
</div>
|
<div class="chart-box-body">
|
<slot></slot>
|
</div>
|
</div>
|
</template>
|
|
<style scoped lang="less">
|
.chart-box-wrapper {
|
display: flex;
|
height: 100%;
|
flex-direction: column;
|
.chart-box-body {
|
flex: 1;
|
}
|
}
|
.chart-box-header {
|
.chart-box-icon {
|
display: inline-block;
|
height: 12px;
|
img {
|
width: auto;
|
height: 100%;
|
}
|
}
|
.chart-box-title {
|
display: inline-block;
|
font-size: 14px;
|
color: #FFFFFF;
|
margin-left: 4px;
|
}
|
}
|
</style>
|