<template>
|
<div class="chart-wrapper">
|
<div class="chart-wrapper-corner top-right"></div>
|
<div class="chart-wrapper-corner bottom-right"></div>
|
<div class="chart-wrapper-title">
|
<span class="title-icon">
|
<span class="title-icon-content"></span>
|
</span>
|
{{title}}
|
</div>
|
<slot></slot>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
name: "ChartWrapper",
|
props:{
|
title: {
|
type: String,
|
default: '未知内容'
|
},
|
}
|
}
|
</script>
|
|
<style scoped>
|
.chart-wrapper {
|
position: relative;
|
box-sizing: border-box;
|
height: 100%;
|
background-image: radial-gradient(#151f4140, #3667ec40);
|
}
|
.chart-wrapper-title {
|
position: absolute;
|
top: 16px;
|
left: 16px;
|
color: #00feff;
|
font-size: 14px;
|
font-weight: bold;
|
}
|
.title-icon {
|
display: inline-block;
|
width: 30px;
|
height: 30px;
|
}
|
.title-icon:before,
|
.title-icon:after,
|
.title-icon-content{
|
display: inline-block;
|
content: "";
|
width: 4px;
|
vertical-align: middle;
|
}
|
|
.title-icon:before {
|
height: 14px;
|
background-color: #0f448d;
|
}
|
.title-icon-content {
|
margin-left: 4px;
|
height: 18px;
|
background-color: #1e77b8;
|
}
|
.title-icon:after {
|
margin-left: 4px;
|
height: 22px;
|
background-color: #2cabe3;
|
}
|
.chart-wrapper:before,
|
.chart-wrapper:after,
|
.chart-wrapper-corner {
|
position: absolute;
|
display: inline-block;
|
content: " ";
|
width: 16px;
|
height: 16px;
|
}
|
.chart-wrapper:before {
|
left: 0;
|
top: 0;
|
border-top: 2px solid #00FEFF;
|
border-left: 2px solid #00FEFF;
|
}
|
.chart-wrapper:after {
|
left: 0;
|
bottom: 0;
|
border-bottom: 2px solid #00FEFF;
|
border-left: 2px solid #00FEFF;
|
}
|
.chart-wrapper-corner.top-right {
|
top: 0;
|
right: 0;
|
border-top: 2px solid #00FEFF;
|
border-right: 2px solid #00FEFF;
|
}
|
.chart-wrapper-corner.bottom-right {
|
bottom: 0;
|
right: 0;
|
border-bottom: 2px solid #00FEFF;
|
border-right: 2px solid #00FEFF;
|
}
|
</style>
|