Index.vue 926 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <el-container>
  3. <el-main>
  4. <nav-bar />
  5. <router-view />
  6. </el-main>
  7. </el-container>
  8. </template>
  9. <script>
  10. import NavBar from 'components/layout/NavBar'
  11. export default {
  12. name: 'Index',
  13. components: {
  14. NavBar
  15. },
  16. data() {
  17. return {
  18. isCollapse: false,
  19. navList: [
  20. { path: '/my', name: '我的帐号', icon: 'el-icon-upload' }
  21. ]
  22. }
  23. },
  24. /* watch: {
  25. // 地址栏 url 发生变化时重新加载本页面
  26. $route() {
  27. this.$router.go()
  28. }
  29. },*/
  30. created() {
  31. document.title = 'tnbapp'
  32. },
  33. methods: {
  34. handleOpen(key, keyPath) {
  35. console.log(key, keyPath)
  36. },
  37. handleClose(key, keyPath) {
  38. console.log(key, keyPath)
  39. }
  40. }
  41. }
  42. </script>
  43. <style>
  44. .el-menu-vertical-demo:not(.el-menu--collapse) {
  45. width: 200px;
  46. min-height: 800px;
  47. }
  48. #aside-style {
  49. min-width: 120px;
  50. max-width: 240px;
  51. width: 30%;
  52. }
  53. </style>