12345678910111213141516171819202122232425262728293031 |
- <template>
- <div id="app">
- <router-view v-if="idRouterAlive"></router-view>
- </div>
- </template>
- <script>
- export default {
- name:"app",
- provide(){
- return{
- reload:this.reload
- }
- },
- data(){
- return{
- idRouterAlive:true
- }
- },
- methods:{
- reload(){
- this.idRouterAlive=false;
- this.$nextTick(function (){
- this.idRouterAlive=true;
- })
- }
- }
- };
- </script>
- <style lang="less" scoped></style>
|