AppAside.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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: 'i18n',
  31. children: [
  32. { text: '页签国际化', to: '/i18n/' },
  33. { text: '组件语言', to: '/lang-en/' },
  34. { text: '组件自定义语言', to: '/lang-custom' }
  35. ]
  36. },
  37. { text: '自定义页签模板', to: '/slot/' }
  38. ]
  39. }, {
  40. text: '页签规则',
  41. children: [
  42. { text: '默认页签规则', to: '/default/rule/a/1' },
  43. { text: '全局页签规则', to: '/global-rule/rule/a/1' },
  44. { text: '路由页签规则', to: '/default/route-rule/a/1' }
  45. ]
  46. }, {
  47. text: '页面配置',
  48. children: [
  49. { text: '动态更新页签配置', to: '/default/tab-dynamic' },
  50. { text: '页面离开确认', to: '/initial-tabs/page-leave' }
  51. ]
  52. }]
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="scss" scoped>
  58. .app-sd {
  59. display: flex;
  60. flex-direction: column;
  61. box-sizing: border-box;
  62. background-color: #fff;
  63. border-right: 1px solid #eaecef;
  64. &-menu {
  65. flex: auto;
  66. padding: 2rem 0;
  67. height: 0;
  68. overflow-y: auto;
  69. > .menu-group {
  70. margin-bottom: 1rem;
  71. }
  72. }
  73. &-ft {
  74. border-top: 1px solid #eee;
  75. @include screen-pc {
  76. .site-link {
  77. display: none;
  78. }
  79. }
  80. }
  81. }
  82. </style>