Commit 4a035478ca0e08098a4575a5b22c06580ffeecbe

Authored by Vben
1 parent 5e36a8b5

fix(flow-chart): dark style not work

src/components/FlowChart/src/index.vue
... ... @@ -81,12 +81,13 @@
81 81 }
82 82 );
83 83  
84   - watch(
85   - () => appStore.getDarkMode,
86   - () => {
87   - init();
88   - }
89   - );
  84 + // TODO
  85 + // watch(
  86 + // () => appStore.getDarkMode,
  87 + // () => {
  88 + // init();
  89 + // }
  90 + // );
90 91  
91 92 watch(
92 93 () => unref(getFlowOptions),
... ... @@ -95,7 +96,6 @@
95 96 }
96 97 );
97 98  
98   - let isInit = false;
99 99 // init logicFlow
100 100 async function init() {
101 101 await nextTick();
... ... @@ -104,16 +104,14 @@
104 104 if (!lfEl) {
105 105 return;
106 106 }
107   - if (!isInit) {
108   - // Canvas configuration
109   - LogicFlow.use(Snapshot);
110   - // Use the bpmn plug-in to introduce bpmn elements, which can be used after conversion in turbo
111   - LogicFlow.use(BpmnElement);
112   - // Start the right-click menu
113   - LogicFlow.use(Menu);
114   - LogicFlow.use(DndPanel);
115   - isInit = true;
116   - }
  107 +
  108 + // Canvas configuration
  109 + LogicFlow.use(Snapshot);
  110 + // Use the bpmn plug-in to introduce bpmn elements, which can be used after conversion in turbo
  111 + LogicFlow.use(BpmnElement);
  112 + // Start the right-click menu
  113 + LogicFlow.use(Menu);
  114 + LogicFlow.use(DndPanel);
117 115  
118 116 lfInstance.value = new LogicFlow({
119 117 ...unref(getFlowOptions),
... ...