componentMenu.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <div class="componentMenuBox" id="componentMenuBox">
  3. <div class="componentMenuTitle">
  4. <div v-if="this.$store.state.template.pageStatus == 1">首页可选板块:</div>
  5. <div v-if="this.$store.state.template.pageStatus == 2">分类页可选板块:</div>
  6. <div v-if="this.$store.state.template.pageStatus == 3">列表页可选板块:</div>
  7. <div v-if="this.$store.state.template.pageStatus == 4">详情页可选板块:</div>
  8. <div v-if="this.$store.state.template.pageStatus == 5">搜索页可选板块:</div>
  9. <div v-if="this.$store.state.template.pageStatus == 6">自定义列表页可选板块:</div>
  10. <div v-if="this.$store.state.template.pageStatus == 7">自定义详情页可选板块:</div>
  11. </div>
  12. <div>
  13. <el-scrollbar wrap-class="scrollbar-wrapper">
  14. <!--首页板块-->
  15. <div v-if="this.$store.state.template.pageStatus == 1">
  16. <indexSector/>
  17. </div>
  18. <!--列表板块-->
  19. <div v-if="this.$store.state.template.pageStatus == 3">
  20. <listSector/>
  21. </div>
  22. <!--详情板块-->
  23. <div v-if="this.$store.state.template.pageStatus == 4">
  24. <articleSector/>
  25. </div>
  26. </el-scrollbar>
  27. </div>
  28. </div>
  29. </template>
  30. <script>
  31. //首页板块
  32. import indexSector from './pages/index/sector.vue';
  33. import listSector from './pages/list/sector.vue';
  34. import articleSector from './pages/article/sector.vue';
  35. export default {
  36. name: 'componentMenu',
  37. components:{
  38. indexSector,
  39. listSector,
  40. articleSector
  41. },
  42. props: {
  43. },
  44. data() {
  45. return {
  46. data: null
  47. }
  48. },
  49. methods: {
  50. }
  51. }
  52. </script>
  53. <style scoped lang="less">
  54. .componentMenuBox {
  55. transition: width 0.28s;
  56. width: 290px !important;
  57. background: #2F2F2F;
  58. height: 100%;
  59. position: fixed;
  60. font-size: 0px;
  61. top: 0;
  62. bottom: 0;
  63. left: 0;
  64. z-index: 1001;
  65. overflow: hidden;
  66. .sectorBox {
  67. height: 100%;
  68. }
  69. .el-scrollbar {
  70. height: calc(100vh - 100px);
  71. }
  72. .componentMenuTitle {
  73. padding: 37px 0 30px 0;
  74. color: #fff;
  75. font-size: 18px;
  76. div {
  77. border-left: 3px solid #5570F1;
  78. padding-left: 25px;
  79. }
  80. }
  81. }
  82. </style>