<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>
#app {
	padding: 0;
	margin: 0;
	height: 100%;
}
</style>
