mirror of
https://gitee.com/honghuangdc/soybean-admin-element-plus.git
synced 2025-12-30 10:22:25 +00:00
7 lines
242 B
TypeScript
7 lines
242 B
TypeScript
export function isPC() {
|
|
const agents = ['Android', 'iPhone', 'webOS', 'BlackBerry', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
|
|
|
|
const isMobile = agents.some(agent => window.navigator.userAgent.includes(agent));
|
|
return !isMobile;
|
|
}
|