fix(client): Fix #6540
This commit is contained in:
		
							parent
							
								
									b6c3399abe
								
							
						
					
					
						commit
						9d3beb3174
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -103,9 +103,13 @@ document.body.innerHTML = '<div id="app"></div>'; | |||
| 
 | ||||
| const store = createStore(); | ||||
| 
 | ||||
| // 他のタブと永続化されたstateを同期
 | ||||
| window.addEventListener('storage', e => { | ||||
| 	if (e.key === 'vuex') { | ||||
| 		store.replaceState(JSON.parse(localStorage['vuex'])); | ||||
| 		store.replaceState({ | ||||
| 			...store.state, | ||||
| 			...JSON.parse(e.newValue) | ||||
| 		}); | ||||
| 	} else if (e.key === 'i') { | ||||
| 		location.reload(); | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue