fix graph

This commit is contained in:
Qiuxia Fan 2022-03-30 16:11:02 +08:00
parent 4339fd645a
commit c8bd3077a8
2 changed files with 4 additions and 5 deletions

View File

@ -34,7 +34,8 @@ import { useDashboardStore } from "@/store/modules/dashboard";
const { t } = useI18n();
const dashboardStore = useDashboardStore();
const fontSize = ref(dashboardStore.selectedGrid.graph.fontSize);
const graph = dashboardStore.selectedGrid.graph || {};
const fontSize = ref(graph.fontSize);
function updateConfig(param: { [key: string]: unknown }) {
const graph = {

View File

@ -165,10 +165,8 @@ export default defineComponent({
const isList = ListChartTypes.includes(
(props.data.graph && props.data.graph.type) || ""
);
if (
ListChartTypes.includes(dashboardStore.selectedGrid.graph.type) ||
isList
) {
const chart = dashboardStore.selectedGrid.graph || {};
if (ListChartTypes.includes(chart.type) || isList) {
return;
}
queryMetrics();