vue3 数据可视化大屏头部组件-数据资产

vue yekong

数据可视化大屏 页面都会有一个特色的头部,用来放标题时间以及菜单等效果,为了方便复用可能会出现的头部,这里将可能会遇到的 数据可视化大屏头部组件 都整理出来方便复用。今天整理的来自数据大屏:数据资产 头部组件。

效果截图

vue3 数据可视化大屏头部组件-数据资产

帧动画效果

通过ae实现从两侧到中间的扫光动画,使用帧动画生成。帧动画虽然增加了效果同时也增加了文件大小。

帧动画文件大小

帧动画图片文件数量74
帧动画图片文件总大小 11M

组件内容

背景加中间标题
加帧动画效果实例

头部大小

1920 * 164

组件代码

<template>
  <div class="header wow fadeInDown" id="header">
    <div class="headerLeft" v-if="type==0">
      <img src="./assets/laba.png" alt="">
      <span>欢迎进入</span>
    </div>
    <div class="headerLeft" v-else>
      <slot></slot>
    </div>
    <div class="headerTitle">
      <p>{{ title }} </p>
      <span>{{ desc }}</span>
    </div>
    <div class="headerRight">
      <div class="info1">{{ time }}</div>
      <div class="info2">
        {{ week }}
        <br>{{ date }}
      </div>
    </div>
  </div>
</template>

<script>
import dayjs from 'dayjs'
import WOW from "wow.js";

export default {
  name: "header",
  data() {
    return {
      date: dayjs().format("YYYY-MM-DD"),
      time: dayjs().format("HH:mm:ss"),
      images: []
    }
  },
  props: {
    title: {
      type: String,
      default() {
        return '';
      }
    },
    type: {
      type: Number,
      default() {
        return 0;
      }
    },
    desc: {
      type: String,
      default() {
        return '';
      }
    },
  },
  components: {},
  computed: {
    week() {
      var datas = dayjs().day()
      var week = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
      return week[datas]
    }
  },
  watch: {},
  mounted() {
    var that = this;
    var wow = new WOW({
      boxClass: "wow", // animated element css class (default is wow)
      animateClass: "animated", // animation css class (default is animated)
      offset: 0, // distance to the element when triggering the animation (default is 0)
      mobile: true, // trigger animations on mobile devices (default is true)
      live: true, // act on asynchronously loaded content (default is true)
      callback: function (box) {
        // the callback is fired every time an animation is started
        // the argument that is passed in is the DOM node being animated
      },
      scrollContainer: null, // optional scroll container selector, otherwise use window,
      resetAnimation: true, // reset animation on end (default is true)
    });
    wow.init();
    setInterval(function () {
      that.time = dayjs().format("HH:mm:ss");
    }, 1000);
  },
  methods: {},
}
</script>

<style lang="scss" scoped>
.header {
  width: 100%;
  position: relative;
  height: 164px;
  z-index: 1;
  background: url("./assets/topbg.png") center center no-repeat;
  background-size: 100% 164px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: nowrap;
  flex-direction: row;
  align-content: flex-start;

  .headerLeft {
    width: 30%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: flex-start;
    font-size: 14px;
    font-family: PingFang;
    font-weight: 500;
    color: #FFFFFF;
    margin-top: 44px;

    img {
      width: 25px;
      height: 20px;
      margin-left: 35px;
    }

    span {
      font-family: 'PingFang SC';
      font-style: normal;
      font-weight: 400;
      font-size: 16px;
      line-height: 22px;
      letter-spacing: 0.05em;
      color: #6CEFFF;
      opacity: 0.8;
      margin-left: 16px;
    }
  }

  .headerRight {
    width: calc(30% - 30px);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: flex-start;
    margin-right: 30px;
    margin-top: 32px;

    .info1 {
      font-family: 'Alibaba PuHuiTi';
      font-style: normal;
      font-weight: 400;
      font-size: 30px;
      line-height: 41px;
      color: #25BBF0;

    }

    .info2 {
      font-family: 'Alibaba PuHuiTi';
      font-style: normal;
      font-weight: 400;
      margin-left: 15px;
      font-size: 12px;
      line-height: 16px;
      color: #25BBF0;
      opacity: 0.8;
    }
  }

  .headerTitle {
    display: flex;
    width: 40%;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: column;
    align-content: flex-start;
    margin-top: 15px;

    p {
      font-size: 40px;
      font-family: YouSheBiaoTiHei-Regular, YouSheBiaoTiHei;
      font-weight: 400;
      margin: 0;
      line-height: 40px;
      letter-spacing: 5px;
      background: linear-gradient(360deg, #4AE9FF 0%, #C9FFFF 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    span {
      font-size: 20px;
      font-family: YouSheBiaoTiHei-Regular, YouSheBiaoTiHei;
      font-weight: 400;
      letter-spacing: 5px;
      background: linear-gradient(360deg, #4AE9FF 0%, #C9FFFF 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
  }
}

.top0 {
  top: -10px;
}
</style>

更多数据可视化大屏头部组件

vue3 数据可视化大屏头部组件汇总

源文件下载

文件包括头部效果代码 vue3 vite js nodejs 14

ae扫光动画源文件

相关文件下载地址
此资源需支付 ¥2 后下载
支付宝购买扫右侧红包码购买更优惠,如无法下载请联系微信:17331886870
喜欢
vue3 数据可视化大屏头部组件-数据资产