<!--
 * @Description: 首页
 * @Author: 李亚光
 * @Date: 2023-09-14
 -->
<script lang="ts" setup name="TDashboard">
import PanelGroup from './components/PanelGroup.vue'
import clock from './components/clock.vue'
import Calendar from './components/calendar.vue'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
const name = userStore.name
</script>

<template>
  <div class="dashboard-container">
    <el-row>
      <el-col :span="16">
        <el-card class="welcome-card">
          <span class="dashboard-text">欢迎您，{{ name }} !</span>
        </el-card>
      </el-col>
      <el-col :span="8">
        <clock />
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="16">
        <panel-group />
      </el-col>
      <el-col :span="8">
        <calendar />
      </el-col>
    </el-row>
  </div>
</template>

<style rel="stylesheet/scss" lang="scss" scoped>
  .dashboard {
    &-container {
      margin: 30px;
    }

    &-text {
      font-size: 26px;
      line-height: 40px;
      padding: 10px;
    }
  }

  .welcome-card {
    margin-right: 20px;
  }
</style>
