fix widget id

This commit is contained in:
Qiuxia Fan 2022-07-07 15:20:57 +08:00
parent 4217837421
commit e7eecf46cf

View File

@ -36,8 +36,10 @@ import { Option } from "@/types/app";
const { t } = useI18n();
const dashboardStore = useDashboardStore();
const associate = dashboardStore.selectedGrid.associate || {};
const widgetId = ref<string[]>(associate.widgetId || []);
const associate = dashboardStore.selectedGrid.associate || [];
const widgetId = ref<string[]>(
associate.map((d: { widgetId: string }) => d.widgetId)
);
const widgets = computed(() => {
const isLinear = ["Bar", "Line", "Area"].includes(
dashboardStore.selectedGrid.graph && dashboardStore.selectedGrid.graph.type