<template>
  <main class="app-main">
    <app-menu></app-menu>
    <div class="app-content">
      <div
        class="app-player"
        ref="layer"
      >
        <Core v-show="$route.meta.loadScene"/>
      </div>
      <toolbar v-show="$route.meta.loadScene"></toolbar>

      <div class="app-view">
        <keep-alive>
          <router-view />
        </keep-alive>
      </div>
    </div>
  </main>
</template>
<script>
import AppMenu from "./MenuPC";
import Core from "./core";
import Toolbar from "./Toolbar";


export default {
  name: "app-main",
  components: {
    AppMenu,
    Core,
    Toolbar
  },
  created() {},
  async mounted() {},
  computed: {}
};
</script>
<style lang="less">
.app-main {
  display: flex;
  flex: 1;
  height: 100%;
  width: 100%;
  overflow: hidden;
}
.app-content {
  position: relative;
  display: flex;
  flex: 1;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.app-player {
  padding: 10px;
  position: relative;
  display: flex;
  flex: 1;
  height: calc(100% - 260px);
  flex-direction: column;
  &.page-guide {
    height: calc(100% - 210px);
  }
}

.app-view {
  display: flex;
  width: 236px;
  height: 100%;
  z-index: 1000;
  > div {
    display: flex;
    width: 100%;
    height: 100%;
    white-space: nowrap;
  }
}
.app-view-toolbar {
  display: flex;
  position: absolute !important;
  left: 0;
  right: 236px;
  bottom: 0;
  height: 260px;
  overflow: hidden;
}

.app-view-full-toolbar {
  height: 100%;
  padding: 10px;
  display: block;
}
</style>
