15 lines
		
	
	
		
			254 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
		
		
			
		
	
	
			15 lines
		
	
	
		
			254 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| 
								 | 
							
								import { ref } from 'vue'
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								let baseZIndex = 1000;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								++baseZIndex;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								const currentZ = ref(baseZIndex)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								export function usePopupZIndex() {
							 | 
						||
| 
								 | 
							
								  function nextZIndex() {
							 | 
						||
| 
								 | 
							
								    currentZ.value += 1
							 | 
						||
| 
								 | 
							
								    return currentZ.value
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								  return { nextZIndex }
							 | 
						||
| 
								 | 
							
								}
							 |