<template>
  <div class="app-container">
    <div class="head-menu">
      <el-button color="#626aef" @click="handleClickMenu('/')">测试用例</el-button>
      <el-button color="#626aef" @click="handleClickMenu('/flow')">用例设计</el-button>
    </div>
    <div class="main-container">
      <router-view />
    </div>
    <div class="status-bar">
      <div id="version-info">版本: {{ version }}</div>
    </div>
  </div>
</template>

<script setup lang="tsx" name="Layout">
import router from '@/router'
const version = ref('v1.0.0')

const handleClickMenu = (path: string) => {
  router.push(path)
}
</script>
<style lang="scss" scoped>
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  .head-menu {
    background: linear-gradient(135deg, var(--ev-c-primary), var(--ev-c-dark));
    height: 55px;
  }
}

.main-container {
  position: relative;
  height: 100vh;
  overflow-y: auto;
}

.status-bar {
  display: flex;
  justify-content: center;
  padding: 8px 20px;
  font-size: 12px;
  background: linear-gradient(135deg, var(--ev-c-primary), var(--ev-c-dark));
  color: var(--ev-c-white);
}
</style>
