diff --git a/src/views/dashboard/configuration/Text.vue b/src/views/dashboard/configuration/Text.vue index 2e298154..722dfd3a 100644 --- a/src/views/dashboard/configuration/Text.vue +++ b/src/views/dashboard/configuration/Text.vue @@ -91,12 +91,13 @@ import { useDashboardStore } from "@/store/modules/dashboard"; const { t } = useI18n(); const dashboardStore = useDashboardStore(); const originConfig = dashboardStore.selectedGrid; +const graph = originConfig.graph || {}; const url = ref(originConfig.graph.url || ""); -const backgroundColor = ref(originConfig.graph.backgroundColor || "green"); -const fontColor = ref(originConfig.graph.fontColor || "white"); -const content = ref(originConfig.graph.content || ""); -const fontSize = ref(originConfig.graph.fontSize || 12); -const textAlign = ref(originConfig.graph.textAlign || "left"); +const backgroundColor = ref(graph.backgroundColor || "green"); +const fontColor = ref(graph.fontColor || "white"); +const content = ref(graph.content || ""); +const fontSize = ref(graph.fontSize || 12); +const textAlign = ref(graph.textAlign || "left"); const Colors = [ { label: "Green", diff --git a/src/views/dashboard/configuration/Topology.vue b/src/views/dashboard/configuration/Topology.vue index e9b28006..dac5d4d9 100644 --- a/src/views/dashboard/configuration/Topology.vue +++ b/src/views/dashboard/configuration/Topology.vue @@ -48,9 +48,9 @@ import { Option } from "@/types/app"; const { t } = useI18n(); const dashboardStore = useDashboardStore(); -const { selectedGrid } = dashboardStore; -const showDepth = ref(selectedGrid.graph.showDepth); -const depth = ref(selectedGrid.graph.depth || 2); +const graph = dashboardStore.selectedGrid.graph || {}; +const showDepth = ref(graph.showDepth); +const depth = ref(graph.depth || 2); function applyConfig() { dashboardStore.setConfigs(dashboardStore.selectedGrid); diff --git a/src/views/dashboard/related/topology/components/Graph.vue b/src/views/dashboard/related/topology/components/Graph.vue index d8d12795..aed1c8ad 100644 --- a/src/views/dashboard/related/topology/components/Graph.vue +++ b/src/views/dashboard/related/topology/components/Graph.vue @@ -24,7 +24,7 @@ limitations under the License. -->
- + {{ t("currentDepth") }}