<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-item index="fkzx">
              <span slot="title">飞控中心</span>
            </el-menu-item>
            <el-menu-item index="fkzx1">
              <span slot="title">飞控中心组件</span>
            </el-menu-item>
            <el-menu-item index="fkzx-iframe">
              <span slot="title">飞控中心iframe</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>
// import store from '@/../../src/components/MMCFlightControlCenter/store';

export default {
  name: 'App',
  components: {
  },
  created(){
    /* if(!this.$store.hasModule('MMCFlightControlCenter')){
      this.$store.registerModule("MMCFlightControlCenter", store);
    } */
  },
  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>
