fix: dashboard polish

This commit is contained in:
qixinbo
2026-03-15 18:04:23 +08:00
parent 4f46f3f8d5
commit e60d8c0658
3 changed files with 42 additions and 15 deletions
+3 -3
View File
@@ -26,10 +26,10 @@ export const useDashboardStore = create<DashboardState>((set) => ({
addChart: (chart) => set((state) => {
const newLayout: GridLayout = {
i: chart.id,
x: (state.charts.length * 6) % 12,
x: (state.charts.length * 4) % 12,
y: Infinity,
w: 6,
h: 8,
w: 4,
h: 4,
};
return { charts: [...state.charts, { ...chart, layout: newLayout }] };
}),