<template>
<el-row>
<el-col :span="6" class="box_gradient">
<div class="line_green"></div>
<div class="line_gradient_green">
<div class="green_num">{{ dqjhz }}</div>
<div class="gradient_text">当前计划值(MW)</div>
</div>
</el-col>
<el-col :span="6" class="box_gradient">
<div class="line_blue"></div>
<div class="line_gradient_blue">
<div class="blue_num">{{ qdsjz }}</div>
<div class="gradient_text">当前实际值(MW)</div>
</div>
</el-col>
<el-col :span="6" class="box_gradient">
<div class="line_yellow"></div>
<div class="line_gradient_yellow">
<div class="yellow_num">{{ dqsrz }}</div>
<div class="gradient_text">当前输入值(MW)</div>
</div>
</el-col>
<el-col :span="6" class="box_gradient">
<div class="line_purple"></div>
<div class="line_gradient_purple">
<div class="purple_num">{{ clpc }}</div>
<div class="gradient_text">出力偏差(MW)</div>
</div>
</el-col>
</el-row>
</template>
<script>
export default {
name: 'GradientBox',
data(){
return{
dqjhz: 112.6,
qdsjz: 121.7,
dqsrz: 109.2,
clpc: 107.7,
}
},
}
</script>
<style scoped>
.box_gradient{
height: 70px;
padding: 0 2px;
}
.line_green{
width: 100%;
height: 2px;
background-color: #1DFBD1;
margin-bottom: 2px;
}
.gradient_text{
width: 100%;
height: 20px;
line-height: 20px;
text-align: center;
color: #ffffff;
font-size: 12px;
}
.line_gradient_green{
width: 100%;
height: 76px;
background-image: linear-gradient(to top, transparent, #1DFBD150);
}
.green_num{
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
font-weight: bolder;
font-size: 26px;
background: linear-gradient(to top, #91F4E1, #FFFFFF);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.line_blue{
width: 100%;
height: 2px;
background-color: #1dc7fb;
margin-bottom: 2px;
}
.line_gradient_blue{
width: 100%;
height: 76px;
background-image: linear-gradient(to top, transparent, #1dc7fb50);
}
.blue_num{
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
font-weight: bolder;
font-size: 26px;
background: linear-gradient(to top, #48A1D2, #FFFFFF);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.line_yellow{
width: 100%;
height: 2px;
background-color: #FFC35E;
margin-bottom: 2px;
}
.line_gradient_yellow{
width: 100%;
height: 76px;
background-image: linear-gradient(to top, transparent, #FFC35E50);
}
.yellow_num{
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
font-weight: bolder;
font-size: 26px;
background: linear-gradient(to top, #FCDAA4, #FFFFFF);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.line_purple{
width: 100%;
height: 2px;
background-color: #AC42FD;
margin-bottom: 2px;
}
.line_gradient_purple{
width: 100%;
height: 76px;
background-image: linear-gradient(to top, transparent, #AC42FD50);
}
.purple_num{
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
font-weight: bolder;
font-size: 26px;
background: linear-gradient(to top, #B991F4, #FFFFFF);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
</style>
自封组件-渐变色的数据展示组件
LXXgalaxy2023-12-21 6:56
相关推荐
前端拾光者25 分钟前
利用D3.js实现数据可视化的简单示例Json_1817901448043 分钟前
电商拍立淘按图搜索API接口系列,文档说明参考风尚云网1 小时前
风尚云网前端学习:一个简易前端新手友好的HTML5页面布局与样式设计木子02041 小时前
前端VUE项目启动方式GISer_Jing1 小时前
React核心功能详解(一)捂月1 小时前
Spring Boot 深度解析:快速构建高效、现代化的 Web 应用程序深度混淆1 小时前
实用功能,觊觎(Edge)浏览器的内置截(长)图功能Smartdaili China1 小时前
如何在 Microsoft Edge 中设置代理: 快速而简单的方法秦老师Q1 小时前
「Chromeg谷歌浏览器/Edge浏览器」篡改猴Tempermongkey插件的安装与使用滴水可藏海1 小时前
Chrome离线安装包下载