App.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <div class="cxt">
  3. <page-header v-if="action && !custom"></page-header>
  4. <router-view :key="$route.fullPath"/>
  5. </div>
  6. </template>
  7. <script>
  8. import PageHeader from "./components/PageHeader"
  9. export default {
  10. name: "",
  11. components: {
  12. PageHeader
  13. },
  14. data() {
  15. return {
  16. action:false
  17. }
  18. },
  19. computed: {
  20. im() {
  21. return this.$route.meta.im
  22. },
  23. custom(){
  24. return this.$route.meta.custom
  25. },
  26. activity() {
  27. return this.$route.meta.activity
  28. },
  29. // action(){
  30. // return this.$route.meta.action
  31. // }
  32. },
  33. watch: {
  34. $route(to, from) {
  35. // to 和 from 都是 路由信息对象
  36. if(to.path!='/login'){
  37. this.action = true
  38. }
  39. }
  40. }
  41. }
  42. </script>
  43. <style>
  44. #nav {
  45. padding: 30px;
  46. }
  47. #nav a {
  48. font-weight: bold;
  49. color: #2c3e50;
  50. }
  51. #nav a.router-link-exact-active {
  52. color: #42b983;
  53. }
  54. ul {
  55. padding-inline-start: 0px;
  56. }
  57. ul li {
  58. list-style-type: none;
  59. }
  60. .mr10 {
  61. margin-right: 10px;
  62. }
  63. * {
  64. margin: 0;
  65. padding: 0;
  66. }
  67. html,
  68. body {
  69. padding: 0;
  70. margin: 0;
  71. width: 100%;
  72. height: 100%;
  73. }
  74. .cxt {
  75. flex: 1;
  76. min-height: 100vh;
  77. display: flex;
  78. flex-direction: column;
  79. }
  80. .fontE1 {
  81. white-space: nowrap;
  82. overflow: hidden;
  83. text-overflow: ellipsis;
  84. }
  85. .fontE2 {
  86. display: -webkit-box;
  87. word-break: break-all;
  88. -webkit-box-orient: vertical;
  89. -webkit-line-clamp: 2;
  90. overflow: hidden;
  91. text-overflow: ellipsis;
  92. }
  93. ::-webkit-scrollbar-track {
  94. box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
  95. background-color: rgba(246, 248, 250, 0.3);
  96. }
  97. ::-webkit-scrollbar {
  98. width: 8px;
  99. background-color: #fff;
  100. }
  101. ::-webkit-scrollbar-track-piece {
  102. background-color: #fff;
  103. }
  104. ::-webkit-scrollbar:horizontal {
  105. height: 10px;
  106. }
  107. ::-webkit-scrollbar-thumb {
  108. background-color: #ccd0d8;
  109. border-radius: 4px;
  110. box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
  111. }
  112. </style>
  113. <style lang="less" >
  114. .el-select__popper {
  115. .el-select-dropdown {
  116. position: initial;
  117. border: none;
  118. margin: 0;
  119. }
  120. }
  121. </style>
  122. <style>
  123. @import "./assets/css/style.less";
  124. </style>