Skip to content

Commit

Permalink
fix(flow-chart): dark style not work
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Apr 17, 2021
1 parent 5e36a8b commit 4a03547
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions src/components/FlowChart/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,13 @@
}
);
watch(
() => appStore.getDarkMode,
() => {
init();
}
);
// TODO
// watch(
// () => appStore.getDarkMode,
// () => {
// init();
// }
// );
watch(
() => unref(getFlowOptions),
Expand All @@ -95,7 +96,6 @@
}
);
let isInit = false;
// init logicFlow
async function init() {
await nextTick();
Expand All @@ -104,16 +104,14 @@
if (!lfEl) {
return;
}
if (!isInit) {
// Canvas configuration
LogicFlow.use(Snapshot);
// Use the bpmn plug-in to introduce bpmn elements, which can be used after conversion in turbo
LogicFlow.use(BpmnElement);
// Start the right-click menu
LogicFlow.use(Menu);
LogicFlow.use(DndPanel);
isInit = true;
}
// Canvas configuration
LogicFlow.use(Snapshot);
// Use the bpmn plug-in to introduce bpmn elements, which can be used after conversion in turbo
LogicFlow.use(BpmnElement);
// Start the right-click menu
LogicFlow.use(Menu);
LogicFlow.use(DndPanel);
lfInstance.value = new LogicFlow({
...unref(getFlowOptions),
Expand Down

0 comments on commit 4a03547

Please sign in to comment.