feat: add auto-load media content setting option
This commit is contained in:
parent
6d7ecfe2fd
commit
f785d0d8a2
35 changed files with 458 additions and 105 deletions
|
|
@ -61,6 +61,11 @@ export function isPartiallyInViewport(el: HTMLElement) {
|
|||
)
|
||||
}
|
||||
|
||||
export function isSupportCheckConnectionType() {
|
||||
if (typeof window === 'undefined' || !(navigator as any).connection) return false
|
||||
return typeof (navigator as any).connection.type === 'string'
|
||||
}
|
||||
|
||||
export function isEmail(email: string) {
|
||||
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue