mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 11:02:11 +08:00
feat(demo): hooks useRequest 异步数据管理 (#3447)
This commit is contained in:
8
packages/hooks/src/useRequest/utils/isOnline.ts
Normal file
8
packages/hooks/src/useRequest/utils/isOnline.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { isBrowser } from './isBrowser';
|
||||
|
||||
export function isOnline(): boolean {
|
||||
if (isBrowser && typeof navigator.onLine !== 'undefined') {
|
||||
return navigator.onLine;
|
||||
}
|
||||
return true;
|
||||
}
|
Reference in New Issue
Block a user