App.vue 756 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <div id="app">
  3. <router-view v-if="isRouterAlive" />
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. name: 'App',
  9. provide (){
  10. return {
  11. reload:this.reload,
  12. }
  13. },
  14. data(){
  15. return {
  16. isRouterAlive:true,
  17. }
  18. },
  19. methods:{
  20. reload (){
  21. this.isRouterAlive = false
  22. this.$nextTick(function(){
  23. this.isRouterAlive = true
  24. })
  25. //this.noreadCounts()
  26. },
  27. },
  28. components:{
  29. }
  30. }
  31. </script>
  32. <style lang="scss" scoped>
  33. #app {
  34. }
  35. #nav {
  36. padding: 30px;
  37. a {
  38. font-weight: bold;
  39. color: #2c3e50;
  40. &.router-link-exact-active {
  41. color: #42b983;
  42. }
  43. }
  44. }
  45. .el-table th.gutter{
  46. display: table-cell!important;
  47. }
  48. </style>