default.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <div class="default">
  3. <el-container>
  4. <el-header>
  5. <header-view @hasEvent="hasClick"/>
  6. </el-header>
  7. <el-container style="width:1360px;margin:0 auto; background:#f2f7fb">
  8. <el-aside :style="loadWidth === true ? width30 : width160" style="overflow:hidden;background: #fff;">
  9. <left-side :isTab="hasTab" @collapseEvent="setWidth"/>
  10. </el-aside>
  11. <el-main style="background: #fff;margin-left:10px;padding:0;padding-bottom: 100px">
  12. <div class="top"></div>
  13. <nuxt/>
  14. </el-main>
  15. </el-container>
  16. </el-container>
  17. </div>
  18. </template>
  19. <script>
  20. import { Header, LeftSide } from '@/components/default'
  21. export default {
  22. name: 'DefaultView',
  23. components: {
  24. HeaderView: Header,
  25. LeftSide
  26. },
  27. data () {
  28. return {
  29. loadWidth: false,
  30. hasTab: '',
  31. width30: {
  32. width:'30px'
  33. },
  34. width160: {
  35. width:'160px'
  36. }
  37. }
  38. },
  39. mounted() {
  40. this.$route.path.indexOf('severPage') !== -1 ? this.hasTab = 'sever' : this.hasTab = 'client'
  41. },
  42. methods: {
  43. setWidth (type) {
  44. this.loadWidth = type
  45. },
  46. hasClick (type) {
  47. this.hasTab = type
  48. }
  49. }
  50. }
  51. </script>
  52. <style type="text/scss" lang="scss">
  53. .el-header{
  54. padding:0;
  55. height: 130px !important;
  56. margin-bottom:20px;
  57. -moz-box-shadow: 0 5px 5px #bcd2ff;
  58. box-shadow:0 5px 5px #bcd2ff;
  59. overflow: hidden;
  60. }
  61. .top{
  62. height: 30px;
  63. background: #b9dbfa;
  64. margin-bottom:15px;
  65. }
  66. </style>