Main.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <main class="app-main">
  3. <app-menu></app-menu>
  4. <div class="app-content">
  5. <div
  6. class="app-player"
  7. ref="layer"
  8. >
  9. <Core v-show="$route.meta.loadScene"/>
  10. </div>
  11. <toolbar v-show="$route.meta.loadScene"></toolbar>
  12. <div class="app-view">
  13. <keep-alive>
  14. <router-view />
  15. </keep-alive>
  16. </div>
  17. </div>
  18. </main>
  19. </template>
  20. <script>
  21. import AppMenu from "./MenuPC";
  22. import Core from "./core";
  23. import Toolbar from "./Toolbar";
  24. export default {
  25. name: "app-main",
  26. components: {
  27. AppMenu,
  28. Core,
  29. Toolbar
  30. },
  31. created() {},
  32. async mounted() {},
  33. computed: {}
  34. };
  35. </script>
  36. <style lang="less">
  37. .app-main {
  38. display: flex;
  39. flex: 1;
  40. height: 100%;
  41. width: 100%;
  42. overflow: hidden;
  43. }
  44. .app-content {
  45. position: relative;
  46. display: flex;
  47. flex: 1;
  48. height: 100%;
  49. width: 100%;
  50. overflow: hidden;
  51. }
  52. .app-player {
  53. padding: 10px;
  54. position: relative;
  55. display: flex;
  56. flex: 1;
  57. height: calc(100% - 260px);
  58. flex-direction: column;
  59. &.page-guide {
  60. height: calc(100% - 210px);
  61. }
  62. }
  63. .app-view {
  64. display: flex;
  65. width: 236px;
  66. height: 100%;
  67. z-index: 1000;
  68. > div {
  69. display: flex;
  70. width: 100%;
  71. height: 100%;
  72. white-space: nowrap;
  73. }
  74. }
  75. .app-view-toolbar {
  76. display: flex;
  77. position: absolute !important;
  78. left: 0;
  79. right: 236px;
  80. bottom: 0;
  81. height: 260px;
  82. overflow: hidden;
  83. }
  84. .app-view-full-toolbar {
  85. height: 100%;
  86. padding: 10px;
  87. display: block;
  88. }
  89. </style>