App.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <div id="app">
  3. <v-tour name="myTour" :steps="steps" :options="myOptions" :callbacks="myCallbacks" v-if="tourFlg"></v-tour>
  4. <transition name="fade" mode="out-in">
  5. <!-- <keep-alive>
  6. <router-view v-if='$route.meta != null && $route.meta.keepAlive'/>
  7. </keep-alive> -->
  8. <router-view v-if="isRouterAlive"/>
  9. </transition>
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. name: 'app',
  15. components: {},
  16. //父组件中返回要传给下级的数据
  17. provide() {
  18. return {
  19. reloads: this.reloads,
  20. }
  21. },
  22. data(){
  23. return{
  24. isRouterAlive:true
  25. }
  26. },
  27. methods:{
  28. reloads(){
  29. this.isRouterAlive = false
  30. this.$nextTick(() => {
  31. this.isRouterAlive = true
  32. })
  33. }
  34. }
  35. }
  36. </script>
  37. <style>
  38. .v-tour__target--highlighted {
  39. box-shadow: 0 0 0 99999px rgba(0,0,0,.4) !important;
  40. }
  41. </style>
  42. <style lang="scss">
  43. body {
  44. margin: 0px;
  45. padding: 0px;
  46. font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
  47. font-size: 14px;
  48. -webkit-font-smoothing: antialiased;
  49. }
  50. #app {
  51. position: absolute;
  52. top: 0px;
  53. bottom: 0px;
  54. width: 100%;
  55. }
  56. .el-submenu [class^=fa] {
  57. vertical-align: baseline;
  58. margin-right: 10px;
  59. }
  60. .el-menu-item [class^=fa] {
  61. vertical-align: baseline;
  62. margin-right: 10px;
  63. }
  64. .toolbar {
  65. background: #f2f2f2;
  66. padding: 10px;
  67. .el-form-item {
  68. margin-bottom: 10px;
  69. }
  70. }
  71. .fade-enter-active,
  72. .fade-leave-active {
  73. transition: all .2s ease;
  74. }
  75. .fade-enter,
  76. .fade-leave-active {
  77. opacity: 0;
  78. }
  79. </style>