index.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <el-container class="layout-container-demo">
  3. <el-aside width="210px" :style="{ 'background-color': '#304156' }">
  4. <component :is="cAside"></component>
  5. </el-aside>
  6. <el-main>
  7. <div class="content-box">
  8. <el-col :span="24" class="content">
  9. <transition name="move" mode="out-in">
  10. <el-row>
  11. <el-col :span="24" class="header">
  12. <component :is="cHeader"></component>
  13. </el-col>
  14. <el-col :span="24" class="crumb">
  15. <component :is="tagsBar"></component>
  16. </el-col>
  17. {{ pagesLoading }}
  18. <el-col :span="24" class="container" :style="{ padding: '10px' }">
  19. <router-view :style="viewStyle"></router-view>
  20. </el-col>
  21. </el-row>
  22. </transition>
  23. <el-backtop target=".content"></el-backtop>
  24. </el-col>
  25. </div>
  26. </el-main>
  27. </el-container>
  28. </template>
  29. <script setup>
  30. // 组件
  31. import cHeader from './parts/Header.vue'
  32. import cAside from './parts/Sidebar.vue'
  33. import tagsBar from './parts/Tagsbar.vue'
  34. const viewStyle = ref({
  35. height: '81.5vh',
  36. background: '#ffffff',
  37. 'overflow-x': 'hidden',
  38. 'overflow-y': 'auto',
  39. border: '1px solid #f0f0f0',
  40. padding: '10px'
  41. })
  42. </script>
  43. <style scoped lang="scss">
  44. .layout-container-demo {
  45. height: 100%;
  46. width: 100%;
  47. .el-header {
  48. padding: 0;
  49. }
  50. .el-main {
  51. padding: 0;
  52. background-color: #f0f0f0;
  53. }
  54. }
  55. </style>