This commit is contained in:
2025-06-17 01:15:17 +08:00
parent 1c8612725c
commit 689312a390
6 changed files with 36 additions and 350 deletions
+2 -2
View File
@@ -9,8 +9,8 @@
<script lang="ts" name="index" setup>
const zoom = computed(() => {
const DPI = /macintosh|mac os x/i.test(navigator.userAgent.toLowerCase()) ? 1 : window.devicePixelRatio || 1;
return /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent || navigator.vendor || (window as any).opera) ? 1 :(window.screen.width / 1800 / 0.85 / DPI).toFixed(2)
const DPI = Math.max(0.85,Math.min(/macintosh|mac os x/i.test(navigator.userAgent.toLowerCase()) ? 1 : window.devicePixelRatio || 1,2)) * 0.85
return /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent || navigator.vendor || (window as any).opera) ? 1 :(window.screen.width / 1800 / DPI).toFixed(2)
})
import { useDialog } from '@/components/hooks/dialog'