diff --git a/src/components/Graph.vue b/src/components/Graph.vue index c216ebee..a694cdeb 100644 --- a/src/components/Graph.vue +++ b/src/components/Graph.vue @@ -28,7 +28,6 @@ import { computed, } from "vue"; import type { PropType } from "vue"; -import _ from "lodash"; import { useECharts } from "@/hooks/useEcharts"; import { addResizeListener, removeResizeListener } from "@/utils/event"; @@ -72,15 +71,15 @@ onMounted(async () => { }); watch( - () => _.cloneDeepWith(props.option), - (data, old) => { + () => props.option, + (newVal, oldVal) => { if (!available.value) { return; } - if (data === old) { + if (JSON.stringify(newVal) === JSON.stringify(oldVal)) { return; } - setOptions(data); + setOptions(newVal); } ); diff --git a/src/views/dashboard/graphs/InstanceList.vue b/src/views/dashboard/graphs/InstanceList.vue index a7893cb4..4a1b367d 100644 --- a/src/views/dashboard/graphs/InstanceList.vue +++ b/src/views/dashboard/graphs/InstanceList.vue @@ -48,6 +48,7 @@ limitations under the License. --> getLabel(metric, index) )} ${decodeURIComponent(getUnit(index))}`" :key="metric + index" + min-width="120" > - +