Commit c6060234 authored by Cai Wei's avatar Cai Wei

chore(*): 兼容小屏幕

parent a0c54578
...@@ -66,8 +66,7 @@ ...@@ -66,8 +66,7 @@
</div> --> </div> -->
</div> </div>
<div class="data-table"> <div class="time-controls">
<div class="time-controls">
<div class="time-desc"> <div class="time-desc">
<span class="icon"></span> <span class="icon"></span>
<span class="time-desc-text">当前实时信号:</span> <span class="time-desc-text">当前实时信号:</span>
...@@ -87,6 +86,8 @@ ...@@ -87,6 +86,8 @@
<el-button @click="reset">重置</el-button> <el-button @click="reset">重置</el-button>
</div> </div>
</div> </div>
<div class="data-table">
<table> <table>
<thead> <thead>
...@@ -565,6 +566,12 @@ onBeforeUnmount(() => { ...@@ -565,6 +566,12 @@ onBeforeUnmount(() => {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-bottom: 16px; margin-bottom: 16px;
@media (max-width: 768px) {
flex-direction: column;
align-items: flex-start;
padding-top: 50px; /* Make room for the select container */
}
.select-container { .select-container {
position: absolute; position: absolute;
...@@ -574,6 +581,13 @@ onBeforeUnmount(() => { ...@@ -574,6 +581,13 @@ onBeforeUnmount(() => {
display: flex; display: flex;
align-items: center; align-items: center;
z-index: 99; z-index: 99;
@media (max-width: 768px) {
width: 100%;
position: relative;
margin-bottom: 10px;
}
.select-label { .select-label {
color: #909399 !important; color: #909399 !important;
font-size: 14px; font-size: 14px;
...@@ -602,6 +616,8 @@ onBeforeUnmount(() => { ...@@ -602,6 +616,8 @@ onBeforeUnmount(() => {
.chart-container { .chart-container {
width: 100%; width: 100%;
height: calc(100% - 350px); height: calc(100% - 350px);
min-height: 200px;
max-height: calc(50vh - 50px);
background-color: #000; background-color: #000;
border-radius: 4px; border-radius: 4px;
display: flex; display: flex;
...@@ -641,8 +657,16 @@ onBeforeUnmount(() => { ...@@ -641,8 +657,16 @@ onBeforeUnmount(() => {
z-index: 100; z-index: 100;
transition: transform 0.3s ease-in-out; transition: transform 0.3s ease-in-out;
@media (max-width: 768px) {
width: 280px;
}
&.collapsed { &.collapsed {
transform: translateX(345px); transform: translateX(345px);
@media (max-width: 768px) {
transform: translateX(300px);
}
} }
.panel-toggle { .panel-toggle {
...@@ -682,8 +706,18 @@ onBeforeUnmount(() => { ...@@ -682,8 +706,18 @@ onBeforeUnmount(() => {
margin-bottom: 5px; margin-bottom: 5px;
font-size: 14px; font-size: 14px;
@media (max-width: 768px) {
flex-wrap: wrap;
font-size: 12px;
}
div { div {
flex: 1; flex: 1;
@media (max-width: 768px) {
min-width: 45%;
margin-bottom: 3px;
}
} }
} }
} }
...@@ -698,10 +732,14 @@ onBeforeUnmount(() => { ...@@ -698,10 +732,14 @@ onBeforeUnmount(() => {
border-radius: 4px; border-radius: 4px;
padding: 10px 0; padding: 10px 0;
box-sizing: border-box; box-sizing: border-box;
overflow-x: auto;
max-height: 300px;
overflow-y: auto;
table { table {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;
min-width: 600px;
th, th,
td { td {
...@@ -749,11 +787,20 @@ onBeforeUnmount(() => { ...@@ -749,11 +787,20 @@ onBeforeUnmount(() => {
} }
} }
}
.time-controls { .time-controls {
margin-bottom: 10px; margin-bottom: 10px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap;
gap: 10px;
@media (max-width: 768px) {
flex-direction: column;
align-items: flex-start;
}
.el-button { .el-button {
border-color: var(--accent); border-color: var(--accent);
...@@ -809,6 +856,5 @@ onBeforeUnmount(() => { ...@@ -809,6 +856,5 @@ onBeforeUnmount(() => {
width: 60px; width: 60px;
} }
} }
}
} }
</style> </style>
...@@ -728,6 +728,10 @@ $borderColor: #3a3f45; ...@@ -728,6 +728,10 @@ $borderColor: #3a3f45;
flex-direction: column; flex-direction: column;
// background-color: #181d21; // background-color: #181d21;
color: #909399; color: #909399;
&::-webkit-scrollbar {
width: 2px;
background-color: rgba(58, 63, 69, 0.5);
}
} }
.top-box { .top-box {
width: 100%; width: 100%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment