diff --git a/src/store/modules/dashboard.ts b/src/store/modules/dashboard.ts index 12e03df8..5fb95524 100644 --- a/src/store/modules/dashboard.ts +++ b/src/store/modules/dashboard.ts @@ -139,7 +139,19 @@ export const dashboardStore = defineStore({ this.entity = type; }, setConfigs(param: { [key: string]: unknown }) { - const index = this.layout.findIndex((d: LayoutConfig) => d.i === param.i); + const actived = this.activedGridItem.split("-"); + const index = this.layout.findIndex( + (d: LayoutConfig) => actived[0] === d.i + ); + + if (actived.length === 3) { + this.layout[index].children[actived[1]].children[actived[2]] = { + ...this.layout[index], + ...param, + }; + this.selectedGrid = this.layout[index]; + return; + } this.layout[index] = { ...this.layout[index], ...param, diff --git a/src/views/dashboard/Edit.vue b/src/views/dashboard/Edit.vue index 5dda9a57..324ff04a 100644 --- a/src/views/dashboard/Edit.vue +++ b/src/views/dashboard/Edit.vue @@ -64,7 +64,8 @@ function handleClick(e: any) {