<template>
  <div id="app">
    <el-container>
      <el-aside>
        <el-col :span="24">
          <el-menu
            default-active=""
            class="el-menu-vertical-demo"
            @select="onSelect"
            >
            <el-menu-item index="uavList">
              <span slot="title">无人机列表</span>
            </el-menu-item>
            <el-menu-item index="dataTransferPanel">
              <span slot="title">无人机数传面板</span>
            </el-menu-item>
            <el-menu-item index="mqtt">
              <span slot="title">飞控MQTT</span>
            </el-menu-item>
            <el-menu-item index="groundStation">
              <span slot="title">地面站WS</span>
            </el-menu-item>
            <el-menu-item index="player">
              <span slot="title">播放器</span>
            </el-menu-item>
          </el-menu>
      </el-col>
      </el-aside>
      <el-main style="padding-right: 300px">
        <router-view></router-view>
      </el-main>
    </el-container>
  </div>
</template>

<script>

export default {
  name: 'App',
  components: {
  },
  methods: {
    onSelect(index){
      this.$router.push({
        path: index
      });
    }
  }
}
</script>

<style>
body{ 
  margin: 0;
}

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

.el-menu-vertical-demo{
  height: 100vh;
}
</style>
