Browse Source

fix: 设置页删除屏幕信息

master
guoapeng 2 weeks ago
parent
commit
10963d8e74
  1. 30
      src/components/setting/Device.vue

30
src/components/setting/Device.vue

@ -4,18 +4,18 @@ import { computed, ref } from 'vue'
const deviceStore = useDeviceStore() const deviceStore = useDeviceStore()
const deviceInfo = ref(deviceStore.deviceInfo) 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__) const webVersion = computed(() => __APP_VERSION__)
</script> </script>
@ -34,9 +34,9 @@ const webVersion = computed(() => __APP_VERSION__)
<div class="device-ul"> <div class="device-ul">
<div>初始化状态{{ deviceInfo.deviceTypeInited ? '已初始化' : '未初始化' }}</div> <div>初始化状态{{ deviceInfo.deviceTypeInited ? '已初始化' : '未初始化' }}</div>
</div> </div>
<div class="device-ul">
<div>设备屏幕尺寸{{ screenWidth }} x {{ screenHeight }}</div>
</div>
<!-- <div class="device-ul"> -->
<!-- <div>设备屏幕尺寸{{ screenWidth }} x {{ screenHeight }}</div> -->
<!-- </div> -->
<div class="device-ul"> <div class="device-ul">
<div>版本信息{{ `${deviceInfo.appVersion}-${webVersion}` }}</div> <div>版本信息{{ `${deviceInfo.appVersion}-${webVersion}` }}</div>
</div> </div>

Loading…
Cancel
Save