diff --git a/src/components/setting/Device.vue b/src/components/setting/Device.vue index 20a28b6..4d60679 100644 --- a/src/components/setting/Device.vue +++ b/src/components/setting/Device.vue @@ -4,18 +4,18 @@ import { computed, ref } from 'vue' const deviceStore = useDeviceStore() const deviceInfo = ref(deviceStore.deviceInfo) -const screenInfo = { - width: window.innerWidth, // 屏幕宽度(逻辑像素) - height: window.innerHeight, // 屏幕高度(逻辑像素) - availWidth: window.screen.availWidth, // 可用宽度(排除任务栏等) - availHeight: window.screen.availHeight, // 可用高度 - pixelRatio: window.devicePixelRatio, // 设备像素比(物理像素/逻辑像素) - colorDepth: window.screen.colorDepth, // 颜色深度 -} -const width = Math.floor(screenInfo.width * screenInfo.pixelRatio) -const height = Math.floor(screenInfo.height * screenInfo.pixelRatio) -const screenWidth = ref(width) -const screenHeight = ref(height) +// const screenInfo = { +// width: window.innerWidth, // 屏幕宽度(逻辑像素) +// height: window.innerHeight, // 屏幕高度(逻辑像素) +// availWidth: window.screen.availWidth, // 可用宽度(排除任务栏等) +// availHeight: window.screen.availHeight, // 可用高度 +// pixelRatio: window.devicePixelRatio, // 设备像素比(物理像素/逻辑像素) +// colorDepth: window.screen.colorDepth, // 颜色深度 +// } +// const width = Math.floor(screenInfo.width * screenInfo.pixelRatio) +// const height = Math.floor(screenInfo.height * screenInfo.pixelRatio) +// const screenWidth = ref(width) +// const screenHeight = ref(height) const webVersion = computed(() => __APP_VERSION__) @@ -34,9 +34,9 @@ const webVersion = computed(() => __APP_VERSION__)