Skip to content

Commit

Permalink
fix: lazy loading on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsuk1ko committed Apr 17, 2024
1 parent e8ad62e commit 3f32bd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/DataImg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img
:src="imgSrc"
:style="imgStyle"
:loading="lazy ? 'lazy' : undefined"
:loading="loading"
crossorigin="anonymous"
@error="isError = true"
/>
Expand Down
4 changes: 2 additions & 2 deletions src/utils/env.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const IS_DEV = process.env.NODE_ENV === 'development';

export const IS_MOBILE = /Mobile|Android|webOS|iPhone|iPad|Phone/i.test(navigator.userAgent);
export const IS_MOBILE = /Mobile|Android|Phone|iPad|webOS/.test(navigator.userAgent);

export const IS_IOS = /iPhone|iPad/i.test(navigator.userAgent);
export const IS_IOS = /iPhone|iPad/.test(navigator.userAgent);

0 comments on commit 3f32bd5

Please sign in to comment.