江夏图书馆大屏
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
671 B

6 months ago
  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. // 实现页面强刷新
  10. provide() {
  11. return {
  12. reload: this.reload
  13. }
  14. },
  15. data() {
  16. return {
  17. isRouterAlive: true
  18. }
  19. },
  20. methods: {
  21. reload() {
  22. this.isRouterAlive = false
  23. this.$nextTick(() => {
  24. this.isRouterAlive = true
  25. })
  26. }
  27. }
  28. }
  29. </script>
  30. <style lang="scss">
  31. body {
  32. margin: 0;
  33. }
  34. #app {
  35. font-family: Avenir, Helvetica, Arial, sans-serif;
  36. -webkit-font-smoothing: antialiased;
  37. -moz-osx-font-smoothing: grayscale;
  38. }
  39. </style>