diff --git a/.postcssrc.js b/.postcssrc.js index fe440a0..8ce1392 100644 --- a/.postcssrc.js +++ b/.postcssrc.js @@ -8,8 +8,8 @@ export default { utf8: false, }, 'postcss-px-to-viewport-8-plugin': { - viewportWidth: 1120, - viewportHeight: 736, + viewportWidth: 1280, + viewportHeight: 800, unitPrecision: 3, // 指定`px`转换为视窗单位值的小数位数(很多时候无法整除) viewportUnit: 'vw', // 指定需要转换成的视窗单位,建议使用vw selectorBlackList: ['.ignore', '.hairlines', ':after'], // 指定不转换为视窗单位的类,可以自定义,可以无限添加,建议定义一至两个通用的类名 diff --git a/src/app.vue b/src/app.vue index 9a889ab..4e4006f 100644 --- a/src/app.vue +++ b/src/app.vue @@ -8,8 +8,8 @@ import { onBeforeUnmount, onMounted, ref } from 'vue' const systemStore = useSystemStore() onMounted(async () => { startProgress() - const res = await getStatus() - systemStore.updateSystemStatus(res) + // const res = await getStatus() + // systemStore.updateSystemStatus(res) }) socket.init((data: System.SystemStatus) => { diff --git a/src/layouts/default.vue b/src/layouts/default.vue index 1fe2285..e36890a 100644 --- a/src/layouts/default.vue +++ b/src/layouts/default.vue @@ -215,7 +215,7 @@ const putEmpty = async () => { @click="router.push(item.path)" ) | {{ item?.meta?.title }} - ft-button( type="primary" :click-handle="putEmpty" style="width: 80px") 排空 + ft-button( type="primary" :click-handle="putEmpty" style="width: 90px") 排空 div(class="header-right") div.power-box(v-if="remoteControlState.connected") div.bg-box(:style="`width: ${remoteControlState.batteryLevel}%; background: ${remoteControlState.batteryLevel === 100 ? '#1dbb1d' : remoteControlState.batteryLevel >20 ? '#1989FA' : 'red'} `") @@ -344,6 +344,8 @@ const putEmpty = async () => { width 70% display flex justify-content center + align-items center + height 100% .header-right display flex align-items center @@ -502,6 +504,7 @@ const putEmpty = async () => { .menu-tag padding 15px 20px font-size 16px + height 100% .el-tag--plain border none diff --git a/src/views/setting/device/index.vue b/src/views/setting/device/index.vue index df60c37..a9e9a1e 100644 --- a/src/views/setting/device/index.vue +++ b/src/views/setting/device/index.vue @@ -11,6 +11,11 @@ const deviceInfo = ref({}) onMounted(async () => { deviceInfo.value = await getDeviceInfo() }) + +// 获取屏幕宽度 +const screenWidth = window.screen.width +// 获取屏幕高度 +const screenHeight = window.screen.height