mirror of
				https://github.com/soybeanjs/soybean-admin.git
				synced 2025-11-04 15:53:43 +08:00 
			
		
		
		
	fix(utils): fix isPC. fixed #644
				
					
				
			This commit is contained in:
		@@ -1,5 +1,7 @@
 | 
				
			|||||||
export function isPC() {
 | 
					export function isPC() {
 | 
				
			||||||
  const agents = ['Android', 'iPhone', 'webOS', 'BlackBerry', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
 | 
					  const agents = ['Android', 'iPhone', 'webOS', 'BlackBerry', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return !agents.includes(window.navigator.userAgent);
 | 
					  const isMobile = agents.some(agent => window.navigator.userAgent.includes(agent));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return !isMobile;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user