mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 12:12:01 +08:00
chore: add some notes
This commit is contained in:
@@ -50,10 +50,6 @@ export function isArray(val: unknown): val is Array<any> {
|
||||
return val && Array.isArray(val);
|
||||
}
|
||||
|
||||
export const isClient = () => {
|
||||
return typeof window !== 'undefined';
|
||||
};
|
||||
|
||||
export const isWindow = (val: any): val is Window => {
|
||||
return typeof window !== 'undefined' && is(val, 'Window');
|
||||
};
|
||||
@@ -64,6 +60,8 @@ export const isElement = (val: unknown): val is Element => {
|
||||
|
||||
export const isServer = typeof window === 'undefined';
|
||||
|
||||
export const isClient = typeof window !== 'undefined';
|
||||
|
||||
export function isImageDom(o: Element) {
|
||||
return o && ['IMAGE', 'IMG'].includes(o.tagName);
|
||||
}
|
||||
|
Reference in New Issue
Block a user