fix: 样式修改完善,逻辑修改。

This commit is contained in:
tianyongbao
2026-01-19 22:34:37 +08:00
parent 51c0703670
commit 6dac8011f0

View File

@@ -196,10 +196,10 @@
</view> </view>
</view> </view>
</nut-config-provider> </nut-config-provider>
<nut-row class="m_t_20" style="width: 100%; overflow: hidden;"> <view class="m_t_20" style="width: 100%; box-sizing: border-box;">
<view class="chart-header-row"> <view class="chart-header-row">
<view class="chart-title"> <view class="left-section">
<text class="title-text">{{ <text class="chart-title-text">{{
prDev === 1 prDev === 1
? "溶解氧" ? "溶解氧"
: prDev === 2 : prDev === 2
@@ -213,6 +213,7 @@
: "" : ""
}}</text> }}</text>
</view> </view>
<view class="center-section">
<view class="day-selector"> <view class="day-selector">
<view <view
class="day-btn" class="day-btn"
@@ -236,10 +237,11 @@
7 7
</view> </view>
</view> </view>
<view class="chart-actions"> </view>
<text @click="fullscreenChart" class="action-link">放大</text> <view class="right-section">
<text class="divider-dot">·</text> <view v-show="showChart" @click="fullscreenChart" class="action-link">放大</view>
<text @click="changeShow" class="action-link">{{ setTitle }}</text> <text v-show="showChart" class="divider-dot">·</text>
<view @click="changeShow" class="action-link">{{ setTitle }}</view>
</view> </view>
</view> </view>
<!-- <nut-col :span="8" class="font_32 f_weight c_222"> <!-- <nut-col :span="8" class="font_32 f_weight c_222">
@@ -290,7 +292,7 @@
<nut-col :span="8" class="font_32 c_1589E9" :style="{ textAlign: 'right' }"> <nut-col :span="8" class="font_32 c_1589E9" :style="{ textAlign: 'right' }">
<view @click="changeShow">{{ setTitle }}</view> <view @click="changeShow">{{ setTitle }}</view>
</nut-col> --> </nut-col> -->
</nut-row> </view>
<view :style="{ position: 'relative', marginTop: '10px', width: '100%', overflow: 'hidden' }" v-show="showChart"> <view :style="{ position: 'relative', marginTop: '10px', width: '100%', overflow: 'hidden' }" v-show="showChart">
<view class="loading-container" v-show="loading"> <view class="loading-container" v-show="loading">
<Loading /> <Loading />
@@ -1978,44 +1980,49 @@ defineExpose({
background: #09b8c2; background: #09b8c2;
} }
// 优化后的图表标题行样式 // 全新设计的图表标题行布局
.chart-header-row { .chart-header-row {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between;
width: 100%; width: 100%;
padding: 0 5px; height: 40px;
gap: 6px; padding: 0 12px;
box-sizing: border-box;
} }
.chart-title { // 左侧区域:标题
flex: 0 0 auto; .left-section {
min-width: 55px; flex-shrink: 0;
.title-text { width: 70px;
font-size: 28px;
.chart-title-text {
font-size: 30px;
font-weight: 600; font-weight: 600;
color: #222; color: #222;
white-space: nowrap; white-space: nowrap;
display: inline-block;
} }
} }
.day-selector { // 中间区域:按钮组
flex: 1 1 auto; .center-section {
flex: 1;
display: flex; display: flex;
align-items: center;
justify-content: center; justify-content: center;
gap: 0; padding: 0 10px;
.day-selector {
display: inline-flex;
align-items: center;
border-radius: 6px; border-radius: 6px;
overflow: hidden; overflow: hidden;
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
max-width: 220px;
.day-btn { .day-btn {
flex: 1; padding: 0 16px;
padding: 0 10px;
height: 34px; height: 34px;
line-height: 34px; line-height: 34px;
font-size: 22px; font-size: 24px;
color: #666; color: #666;
background: #fff; background: #fff;
border-right: 1px solid #e5e5e5; border-right: 1px solid #e5e5e5;
@@ -2039,17 +2046,19 @@ defineExpose({
} }
} }
} }
}
.chart-actions { // 右侧区域:放大隐藏
flex: 0 0 auto; .right-section {
flex-shrink: 0;
width: 105px;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 4px; justify-content: flex-start;
min-width: 85px; gap: 6px;
justify-content: flex-end;
.action-link { .action-link {
font-size: 24px; font-size: 26px;
color: #1589E9; color: #1589E9;
white-space: nowrap; white-space: nowrap;
cursor: pointer; cursor: pointer;
@@ -2061,7 +2070,7 @@ defineExpose({
} }
.divider-dot { .divider-dot {
font-size: 16px; font-size: 18px;
color: #ccc; color: #ccc;
margin: 0; margin: 0;
} }
@@ -2150,7 +2159,7 @@ defineExpose({
// 功能按钮区域样式 // 功能按钮区域样式
.action-buttons { .action-buttons {
margin-top: 20rpx; margin-top: 10rpx;
padding: 0; padding: 0;
width: 100%; width: 100%;