数据可视化大屏 页面都会有一个特色的头部,用来放标题时间以及菜单等效果,为了方便复用可能会出现的头部,这里将可能会遇到的 数据可视化大屏头部组件 都整理出来方便复用。今天整理的来自数据大屏:固废全过程 头部组件。
效果截图
帧动画效果
通过ae实现从两侧到中间的扫光动画,使用帧动画生成。帧动画虽然增加了效果同时也增加了文件大小。
帧动画文件大小
帧动画图片文件数量74
帧动画图片文件总大小 5M
演示地址
组件代码
<template>
<div class="pageTop">
<div class="pageTopLeft">
<div class="Address">
<img src="./assets/icon_address.png" alt="">
<span>陕西省</span>
<span>天气:晴</span>
</div>
</div>
<div class="pageTopCenter">
<span>数据大屏</span>
</div>
<div class="pageTopRight">
<span>
{{ date }} {{ time }} {{ week }}
</span>
</div>
</div>
</template>
<script>
import dayjs from 'dayjs'
import WOW from "wow.js";
export default {
data() {
return {
date: dayjs().format("YYYY-MM-DD"),
time: dayjs().format("HH:mm:ss"),
}
},
components: {},
computed: {
week() {
var datas = dayjs().day()
var week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
return week[datas]
}
},
mounted() {
var that = this;
var wow = new WOW({
boxClass: "wow",
animateClass: "animated",
offset: 0,
mobile: true,
live: true,
scrollContainer: null,
resetAnimation: true,
});
wow.init();
setInterval(function () {
that.time = dayjs().format("HH:mm:ss");
}, 1000);
},
methods: {},
filters: {},
watch: {}
}
</script>
<style lang="scss" scoped>
.pageTop {
background: url("./assets/topBg.png") no-repeat;
width: 100%;
height: 90px;
background-size: 100% 100%;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: nowrap;
flex-direction: row;
align-content: flex-start;
.pageTopLeft {
width: 30%;
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: nowrap;
flex-direction: row;
align-content: flex-start;
.Address {
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: nowrap;
flex-direction: row;
align-content: flex-start;
margin-left: 30px;
img {
width: 15px;
height: 20px;
margin-right: 8px;
}
span {
font-size: 14px;
font-family: PingFang;
font-weight: 500;
color: #FBFFFF;
margin-right: 40px;
}
}
}
.pageTopCenter {
width: 40%;
display: flex;
justify-content: center;
align-items: flex-start;
flex-wrap: nowrap;
flex-direction: row;
align-content: flex-start;
position: relative;
height: 100%;
font-size: 42px;
font-family: PangMenZhengDao;
font-weight: bold;
color: #FBFFFF;
span {
padding-top: 10px;
}
}
.pageTopRight {
width: 30%;
display: flex;
justify-content: flex-end;
align-items: center;
flex-wrap: nowrap;
flex-direction: row;
align-content: flex-start;
font-size: 14px;
font-family: PingFang;
font-weight: 500;
color: #FBFFFF;
span {
margin-right: 30px;
}
}
}
</style>
更多数据可视化大屏头部组件
源文件下载
文件包括头部效果代码 vue3 vite js nodejs 14
ae扫光动画源文件