mainMenu.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <template>
  2. <div class="main1">
  3. <div class="main-top2">
  4. <div class="FengXianDIV1">
  5. <span class="pr15 pl15" style="font-weight: bold">{{ title }}</span>
  6. </div>
  7. <div class="GeneralSelectDiv1">
  8. <ul class="productsuse inlineblock vm"></ul>
  9. </div>
  10. <div class="clearboth"></div>
  11. </div>
  12. </div>
  13. </template>
  14. <script>
  15. import { mapGetters, mapState } from 'vuex'
  16. export default {
  17. data() {
  18. return {
  19. // 标题
  20. title: undefined,
  21. // 弹出框标题
  22. // dialogTitle: undefined,
  23. // 文档列表
  24. docList: [],
  25. // 控制弹窗显隐
  26. // dialogVisible: false,
  27. // 当前父菜单对象
  28. currentMenu: {},
  29. // 菜单位置
  30. type: undefined,
  31. //选中的小文档数组
  32. // selectDocList: [],
  33. //当前菜单路由id
  34. routeId: undefined,
  35. // 记录选中顺序
  36. // sort: 0
  37. }
  38. },
  39. computed: {
  40. ...mapState(['settings']),
  41. ...mapGetters(['sidebarRouters', 'sidebar'])
  42. },
  43. watch: {
  44. // 监听路由跳转
  45. $route: {
  46. handler: function (route) {
  47. this.routeId = route.query.id
  48. this.init(this.routeId)
  49. },
  50. //一进页面就执行
  51. immediate: true
  52. //deep:true
  53. }
  54. },
  55. methods: {
  56. // 获取菜单
  57. init(routeId) {
  58. // this.docList = this.sidebarRouters.filter((item) => item.menuId == routeId)
  59. console.log(this.sidebarRouters)
  60. },
  61. },
  62. }
  63. </script>
  64. <style>
  65. .main1 {
  66. min-height: calc(100vh - 73px);
  67. padding: 10px 10px 0 10px;
  68. box-shadow: #dac488 0px 0px 14px inset;
  69. /* margin-top: -10px; */
  70. /* margin-left: -10px; */
  71. background-color: #000;
  72. }
  73. .main-top2 {
  74. position: relative;
  75. height: 60px;
  76. border-bottom: 2px solid #ffeb9c;
  77. width: 100%;
  78. }
  79. .FengXianDIV1 {
  80. height: 60px;
  81. line-height: 60px;
  82. text-align: center;
  83. border-top-left-radius: 6px;
  84. border-top-right-radius: 6px;
  85. background-color: #ffeb9c;
  86. min-width: 150px;
  87. float: left;
  88. }
  89. </style>