<template>
  <div id="app">
    <router-view v-if="refresh" />
  </div>
</template>

<script>
export default {
  name: "App",
  provide(){
    return {
      reload:this.reload
    }
  },
  data() {
    return {
      refresh: true, //控制整个页面刷新
    };
  },
  methods: {
    reload() {
      this.refresh = false;
      this.$nextTick(() => {
        this.refresh = true;
      });
    },
  },
};
</script>

<style lang="less">
html,
body {
  height: 100%;
  margin: 0;
  #app {
    height: 100%;
  }
}
</style>
