ヘッダーの戻るボタンがページリロードすると消える問題を修正
This commit is contained in:
		
							parent
							
								
									62591e0e7a
								
							
						
					
					
						commit
						7353d729d7
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
					@ -42,9 +42,12 @@ export default defineComponent({
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	watch: {
 | 
						watch: {
 | 
				
			||||||
		$route(to, from) {
 | 
							$route: {
 | 
				
			||||||
 | 
								handler(to, from) {
 | 
				
			||||||
				this.canBack = (window.history.length > 0 && !['index'].includes(to.name));
 | 
									this.canBack = (window.history.length > 0 && !['index'].includes(to.name));
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
 | 
								immediate: true
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mounted() {
 | 
						mounted() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue