This commit is contained in:
Qiuxia Fan 2022-07-07 11:29:35 +08:00
parent 2013fa9767
commit bdc671ada8
2 changed files with 4 additions and 1 deletions

View File

@ -80,6 +80,7 @@ export const dashboardStore = defineStore({
const newItem: LayoutConfig = {
...NewControl,
i: index,
id: index,
type,
metricTypes: [""],
metrics: [""],
@ -152,9 +153,11 @@ export const dashboardStore = defineStore({
if (!children.length) {
index = "0";
}
const id = `${activedGridItem}-${tabIndex}-${index}`;
const newItem: LayoutConfig = {
...NewControl,
i: index,
id,
type,
metricTypes: [""],
metrics: [""],

View File

@ -235,7 +235,6 @@ function optimizeTemplate(
children: (LayoutConfig & {
moved?: boolean;
standard?: unknown;
id?: string;
})[]
) {
for (const child of children || []) {
@ -407,6 +406,7 @@ async function updateName(d: DashboardItem, value: string) {
name: value,
};
delete c.id;
delete c.filters;
const setting = {
id: d.id,
configuration: JSON.stringify(c),