fix: update param

This commit is contained in:
Qiuxia Fan 2022-02-19 20:40:23 +08:00
parent 3c79e45f4a
commit 1ebf0ba261
3 changed files with 10 additions and 3 deletions

View File

@ -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;

View File

@ -116,7 +116,7 @@ export interface TopologyConfig {
type?: string;
backgroundColor?: string;
fontColor?: string;
iconTheme?: string;
iconTheme?: boolean;
content?: string;
fontSize?: number;
}

View File

@ -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);