123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- <script setup lang="ts">
- import {
- ReGithub,
- ReInfinite,
- RePie,
- ReLine,
- ReBar
- } from "/@/components/ReCharts/index";
- import { ref, computed } from "vue";
- const date: Date = new Date();
- let loading = ref<boolean>(true);
- setTimeout(() => {
- loading.value = !loading.value;
- }, 500);
- let greetings = computed(() => {
- if (date.getHours() >= 0 && date.getHours() < 12) {
- return "上午阳光明媚,祝你薪水翻倍🌞!";
- } else if (date.getHours() >= 12 && date.getHours() < 18) {
- return "下午小风娇好,愿你青春不老😃!";
- } else {
- return "折一根天使羽毛,愿拂去您的疲惫烦恼忧伤🌛!";
- }
- });
- const openDepot = (): void => {
- window.open("https://github.com/xiaoxian521/vue-pure-admin");
- };
- </script>
- <template>
- <div class="welcome">
- <el-card class="top-content">
- <div class="left-mark">
- <img
- src="https://avatars.githubusercontent.com/u/44761321?s=400&u=30907819abd29bb3779bc247910873e7c7f7c12f&v=4"
- title="直达仓库地址"
- @click="openDepot"
- />
- <span>{{ greetings }}</span>
- </div>
- </el-card>
- <el-row :gutter="24" style="margin: 20px">
- <el-col
- :xs="24"
- :sm="24"
- :md="12"
- :lg="12"
- :xl="12"
- style="margin-bottom: 20px"
- >
- <el-skeleton animated :rows="7" :loading="false">
- <template #default>
- <el-card>
- <h4>GitHub信息</h4>
- <ReGithub />
- </el-card>
- </template>
- </el-skeleton>
- </el-col>
- <el-col
- :xs="24"
- :sm="24"
- :md="12"
- :lg="12"
- :xl="12"
- style="margin-bottom: 20px"
- >
- <el-skeleton animated :rows="7" :loading="false">
- <template #default>
- <el-card>
- <h4>GitHub滚动信息</h4>
- <ReInfinite />
- </el-card>
- </template>
- </el-skeleton>
- </el-col>
- <el-col
- :xs="24"
- :sm="24"
- :md="12"
- :lg="8"
- :xl="8"
- style="margin-bottom: 20px"
- >
- <el-skeleton animated :rows="7" :loading="false">
- <template #default>
- <el-card>
- <h4>GitHub饼图信息</h4>
- <RePie />
- </el-card>
- </template>
- </el-skeleton>
- </el-col>
- <el-col
- :xs="24"
- :sm="24"
- :md="12"
- :lg="8"
- :xl="8"
- style="margin-bottom: 20px"
- >
- <el-skeleton animated :rows="7" :loading="false">
- <template #default>
- <el-card>
- <h4>GitHub折线图信息</h4>
- <ReLine />
- </el-card>
- </template>
- </el-skeleton>
- </el-col>
- <el-col
- :xs="24"
- :sm="24"
- :md="24"
- :lg="8"
- :xl="1"
- style="margin-bottom: 20px"
- >
- <el-skeleton animated :rows="7" :loading="false">
- <template #default>
- <el-card>
- <h4>GitHub柱状图信息</h4>
- <ReBar />
- </el-card>
- </template>
- </el-skeleton>
- </el-col>
- </el-row>
- </div>
- </template>
- <style module scoped>
- .size {
- height: 335px;
- }
- </style>
- <style lang="scss" scoped>
- .main-content {
- margin: 0;
- }
- .welcome {
- height: 100%;
- .top-content {
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 60px;
- background: #fff;
- .left-mark {
- display: flex;
- align-items: center;
- img {
- display: block;
- width: 50px;
- height: 50px;
- border-radius: 50%;
- margin-right: 10px;
- cursor: pointer;
- }
- span {
- font-size: 14px;
- }
- }
- }
- }
- </style>
|