feat: 滚动条不再导致布局抖动,优化图表配色

This commit is contained in:
amtoaer
2025-11-09 21:48:05 +08:00
parent 66996a77c6
commit 8931cb5d2a
2 changed files with 10 additions and 6 deletions
+5 -1
View File
@@ -19,7 +19,11 @@
<BreadCrumb items={$breadcrumbStore} /> <BreadCrumb items={$breadcrumbStore} />
</div> </div>
</header> </header>
<div class="w-full overflow-y-auto px-6 py-2" style="scrollbar-width: thin;" id="main"> <div
class="w-full overflow-y-auto px-6 py-2"
style="scrollbar-width: thin; scrollbar-gutter: stable !important;"
id="main"
>
<slot /> <slot />
</div> </div>
</Sidebar.Inset> </Sidebar.Inset>
+5 -5
View File
@@ -105,29 +105,29 @@
const videoChartConfig = { const videoChartConfig = {
videos: { videos: {
label: '视频数量', label: '视频数量',
color: 'var(--color-slate-700)' color: 'var(--primary)'
} }
} satisfies Chart.ChartConfig; } satisfies Chart.ChartConfig;
const memoryChartConfig = { const memoryChartConfig = {
used: { used: {
label: '整体占用', label: '整体占用',
color: 'var(--color-slate-700)' color: 'var(--primary)'
}, },
process: { process: {
label: '程序占用', label: '程序占用',
color: 'var(--color-slate-950)' color: 'oklch(from var(--primary) calc(l * 0.6) c h)'
} }
} satisfies Chart.ChartConfig; } satisfies Chart.ChartConfig;
const cpuChartConfig = { const cpuChartConfig = {
used: { used: {
label: '整体占用', label: '整体占用',
color: 'var(--color-slate-700)' color: 'var(--primary)'
}, },
process: { process: {
label: '程序占用', label: '程序占用',
color: 'var(--color-slate-950)' color: 'oklch(from var(--primary) calc(l * 0.6) c h)'
} }
} satisfies Chart.ChartConfig; } satisfies Chart.ChartConfig;