From 10963d8e74f5e5a97ce5f3ae0d94928b8f49c162 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Sat, 5 Jul 2025 17:23:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=BE=E7=BD=AE=E9=A1=B5=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=B1=8F=E5=B9=95=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/setting/Device.vue | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) 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__)
初始化状态:{{ deviceInfo.deviceTypeInited ? '已初始化' : '未初始化' }}
-
-
设备屏幕尺寸:{{ screenWidth }} x {{ screenHeight }}
-
+ + +
版本信息:{{ `${deviceInfo.appVersion}-${webVersion}` }}