优化驾驶舱
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<GridLayout
|
||||
class="default-main"
|
||||
v-model:layout="layout"
|
||||
:row-height="rowHeight"
|
||||
:is-resizable="false"
|
||||
@@ -13,7 +14,7 @@
|
||||
<div class="box">
|
||||
<div class="title">
|
||||
<div style="display: flex; align-items: center">
|
||||
<HelpFilled class="HelpFilled" />
|
||||
<Icon class="HelpFilled" :name="item.icon" />
|
||||
{{ item.name }}
|
||||
</div>
|
||||
<!-- <FullScreen class="HelpFilled" style="cursor: pointer" @click="zoom(item)" /> -->
|
||||
@@ -92,7 +93,7 @@ const getMainWidth = () => {
|
||||
|
||||
// 初始化行高
|
||||
const initRowHeight = () => {
|
||||
rowHeight.value = Math.max(0, getMainHeight() / 6)
|
||||
rowHeight.value = Math.max(0, (getMainHeight() - 20) / 6)
|
||||
rowWidth.value = Math.max(0, getMainWidth() / 12)
|
||||
}
|
||||
|
||||
@@ -166,7 +167,7 @@ const fetchLayoutData = async () => {
|
||||
// 窗口大小变化处理 - 使用防抖
|
||||
const handleResize = useDebounceFn(() => {
|
||||
initRowHeight()
|
||||
key.value += 1
|
||||
key.value += 1
|
||||
}, 200)
|
||||
|
||||
// 生命周期钩子
|
||||
@@ -236,6 +237,7 @@ onUnmounted(() => {
|
||||
.HelpFilled {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
color: #fff !important;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user