From 1ebf0ba261bd96472d91e931285cc9167a41d91d Mon Sep 17 00:00:00 2001 From: Qiuxia Fan Date: Sat, 19 Feb 2022 20:40:23 +0800 Subject: [PATCH] fix: update param --- src/store/modules/dashboard.ts | 9 ++++++++- src/types/dashboard.ts | 2 +- src/views/dashboard/controls/Topology.vue | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/store/modules/dashboard.ts b/src/store/modules/dashboard.ts index 941ebbd0..d19ee349 100644 --- a/src/store/modules/dashboard.ts +++ b/src/store/modules/dashboard.ts @@ -84,8 +84,15 @@ export const dashboardStore = defineStore({ ]; } if (type === "Topology") { - newWidget.w = 2; + newWidget.w = 4; newWidget.h = 6; + newWidget.graph = { + fontColor: "white", + backgroundColor: "green", + iconTheme: true, + content: "Topology", + fontSize: 18, + }; } this.layout = this.layout.map((d: LayoutConfig) => { d.y = d.y + newWidget.h; diff --git a/src/types/dashboard.ts b/src/types/dashboard.ts index 0d23efb0..5f3cd251 100644 --- a/src/types/dashboard.ts +++ b/src/types/dashboard.ts @@ -116,7 +116,7 @@ export interface TopologyConfig { type?: string; backgroundColor?: string; fontColor?: string; - iconTheme?: string; + iconTheme?: boolean; content?: string; fontSize?: number; } diff --git a/src/views/dashboard/controls/Topology.vue b/src/views/dashboard/controls/Topology.vue index 4ee116b0..67ef3993 100644 --- a/src/views/dashboard/controls/Topology.vue +++ b/src/views/dashboard/controls/Topology.vue @@ -77,7 +77,7 @@ const props = defineProps({ }); const { t } = useI18n(); const dashboardStore = useDashboardStore(); -console.log(Colors[props.data.graph.backgroundColor]); + function editConfig() { dashboardStore.setConfigPanel(true); dashboardStore.selectWidget(props.data);