AppAside.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <aside class="app-sd">
  3. <div class="app-sd-menu">
  4. <menu-group
  5. v-for="(item, index) in menu"
  6. :key="index"
  7. :data="item"
  8. />
  9. </div>
  10. <footer class="app-sd-ft">
  11. <site-link />
  12. </footer>
  13. </aside>
  14. </template>
  15. <script>
  16. import MenuGroup from './MenuGroup.vue'
  17. import SiteLink from './SiteLink.vue'
  18. export default {
  19. name: 'AppAside',
  20. components: { MenuGroup, SiteLink },
  21. data () {
  22. return {
  23. menu: [{
  24. text: 'RouterTab 配置',
  25. children: [
  26. { text: '默认配置', to: '/default/' },
  27. { text: '过渡效果', to: '/transition/' },
  28. { text: '初始展示页签', to: '/initial-tabs/' },
  29. {
  30. text: '语言配置',
  31. children: [
  32. { text: '指定语言', to: '/lang-en/' },
  33. { text: '自定义语言', to: '/lang-custom' }
  34. ]
  35. },
  36. { text: '自定义页签模板', to: '/slot/' }
  37. ]
  38. }, {
  39. text: '页签规则',
  40. children: [
  41. { text: '默认页签规则', to: '/default/rule/a/1' },
  42. { text: '全局页签规则', to: '/global-rule/rule/a/1' },
  43. { text: '路由页签规则', to: '/default/route-rule/a/1' }
  44. ]
  45. }, {
  46. text: '页面配置',
  47. children: [
  48. { text: '动态更新页签配置', to: '/default/tab-dynamic' },
  49. { text: '页面离开确认', to: '/initial-tabs/page-leave' }
  50. ]
  51. }]
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .app-sd {
  58. display: flex;
  59. flex-direction: column;
  60. box-sizing: border-box;
  61. background-color: #fff;
  62. border-right: 1px solid #eaecef;
  63. &-menu {
  64. flex: auto;
  65. padding: 2rem 0;
  66. height: 0;
  67. overflow-y: auto;
  68. > .menu-group {
  69. margin-bottom: 1rem;
  70. }
  71. }
  72. &-ft {
  73. border-top: 1px solid #eee;
  74. @include screen-pc {
  75. .site-link {
  76. display: none;
  77. }
  78. }
  79. }
  80. }
  81. </style>