Browse Source

fix: style-update

master
guoapeng 2 days ago
parent
commit
9b1a8cf30b
  1. 4
      .postcssrc.js
  2. 4
      src/app.vue
  3. 5
      src/layouts/default.vue
  4. 9
      src/views/setting/device/index.vue

4
.postcssrc.js

@ -8,8 +8,8 @@ export default {
utf8: false, utf8: false,
}, },
'postcss-px-to-viewport-8-plugin': { 'postcss-px-to-viewport-8-plugin': {
viewportWidth: 1120,
viewportHeight: 736,
viewportWidth: 1280,
viewportHeight: 800,
unitPrecision: 3, // 指定`px`转换为视窗单位值的小数位数(很多时候无法整除) unitPrecision: 3, // 指定`px`转换为视窗单位值的小数位数(很多时候无法整除)
viewportUnit: 'vw', // 指定需要转换成的视窗单位,建议使用vw viewportUnit: 'vw', // 指定需要转换成的视窗单位,建议使用vw
selectorBlackList: ['.ignore', '.hairlines', ':after'], // 指定不转换为视窗单位的类,可以自定义,可以无限添加,建议定义一至两个通用的类名 selectorBlackList: ['.ignore', '.hairlines', ':after'], // 指定不转换为视窗单位的类,可以自定义,可以无限添加,建议定义一至两个通用的类名

4
src/app.vue

@ -8,8 +8,8 @@ import { onBeforeUnmount, onMounted, ref } from 'vue'
const systemStore = useSystemStore() const systemStore = useSystemStore()
onMounted(async () => { onMounted(async () => {
startProgress() startProgress()
const res = await getStatus()
systemStore.updateSystemStatus(res)
// const res = await getStatus()
// systemStore.updateSystemStatus(res)
}) })
socket.init((data: System.SystemStatus) => { socket.init((data: System.SystemStatus) => {

5
src/layouts/default.vue

@ -215,7 +215,7 @@ const putEmpty = async () => {
@click="router.push(item.path)" @click="router.push(item.path)"
) )
| {{ item?.meta?.title }} | {{ 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(class="header-right")
div.power-box(v-if="remoteControlState.connected") div.power-box(v-if="remoteControlState.connected")
div.bg-box(:style="`width: ${remoteControlState.batteryLevel}%; background: ${remoteControlState.batteryLevel === 100 ? '#1dbb1d' : remoteControlState.batteryLevel >20 ? '#1989FA' : 'red'} `") 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% width 70%
display flex display flex
justify-content center justify-content center
align-items center
height 100%
.header-right .header-right
display flex display flex
align-items center align-items center
@ -502,6 +504,7 @@ const putEmpty = async () => {
.menu-tag .menu-tag
padding 15px 20px padding 15px 20px
font-size 16px font-size 16px
height 100%
.el-tag--plain .el-tag--plain
border none border none

9
src/views/setting/device/index.vue

@ -11,6 +11,11 @@ const deviceInfo = ref<System.DeviceInfo>({})
onMounted(async () => { onMounted(async () => {
deviceInfo.value = await getDeviceInfo() deviceInfo.value = await getDeviceInfo()
}) })
//
const screenWidth = window.screen.width
//
const screenHeight = window.screen.height
</script> </script>
<template> <template>
@ -35,6 +40,10 @@ onMounted(async () => {
<span>设备SN码: </span> <span>设备SN码: </span>
<span>{{ deviceInfo.deviceSn || "--" }}</span> <span>{{ deviceInfo.deviceSn || "--" }}</span>
</p> </p>
<p>
<span>屏幕分辨率: </span>
<span>{{ `${screenWidth}x${screenHeight}` }}</span>
</p>
</div> </div>
</template> </template>

Loading…
Cancel
Save