<template>
|
<div class="pie-chart-fill-wrapper">
|
<div class="pie-chart-fill-title">
|
<div class="pie-chart-fill-text">{{ title }}</div>
|
</div>
|
<div class="pie-chart-fill-header">
|
<slot name="header"></slot>
|
</div>
|
<div class="pie-chart-fill-body">
|
<slot></slot>
|
</div>
|
<div class="pie-chart-fill-footer">
|
<slot name="footer"></slot>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
name: "PieChartFillWrapper",
|
props: {
|
title: {
|
type: String,
|
default: '未知'
|
}
|
},
|
data() {
|
return {}
|
}
|
}
|
</script>
|
|
<style scoped>
|
.pie-chart-fill-wrapper {
|
position: relative;
|
height: 100%;
|
padding-top: 50px;
|
box-sizing: border-box;
|
}
|
.pie-chart-fill-title,
|
.pie-chart-fill-header,
|
.pie-chart-fill-body,
|
.pie-chart-fill-footer {
|
position: absolute;
|
}
|
.pie-chart-fill-title {
|
width: 70%;
|
height: 30%;
|
left: 15%;
|
border-top: 1px solid #00fefe;
|
border-left: 1px solid #00fefe;
|
border-right: 1px solid #00fefe;
|
text-align: center;
|
}
|
.pie-chart-fill-text {
|
position: relative;
|
display: inline-block;
|
padding: 2px 4px;
|
font-size: 12px;
|
color: #024c89;
|
background-color: #00fefe;
|
border-radius: 4px;
|
top: -12px;
|
}
|
.pie-chart-fill-header,
|
.pie-chart-fill-footer{
|
width: 30%;
|
height: 30%;
|
top: 45%;
|
}
|
.pie-chart-fill-footer {
|
right: 0;
|
}
|
.pie-chart-fill-body {
|
width: 40%;
|
height: 40%;
|
top: 38%;
|
left: 30%;
|
}
|
</style>
|