首页 > 其他 > 详细

vue刷新页面

时间:2020-07-27 16:42:04      阅读:67      评论:0      收藏:0      [点我收藏+]
<template>
  <div id="app">
    <router-view v-if="isRouterAlive"></router-view>
  </div>
</template>

<script>

export default {
  name: ‘App‘,
  provide() {
    return {
      reload: this.reload
    }
  },
  data() {
    return {
      isRouterAlive: true
    }
  },
  methods: {
    
    reload() {
      this.isRouterAlive = false
      this.$nextTick(function () {
        this.isRouterAlive = true
      })
    }
  }
}
  inject: [‘reload‘],

 

技术分享图片

 

 

技术分享图片

 

vue刷新页面

原文:https://www.cnblogs.com/matd/p/13385155.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!