Update Nuxt Configuration and Enhance ProcessFlowCanvas Component
- Added optimization settings for 'vue-toastification' in nuxt.config.js to improve dependency handling. - Wrapped VueFlow component in a <client-only> tag within ProcessFlowCanvas.vue to prevent server-side rendering issues, ensuring proper rendering of flow components only on the client side. - Maintained existing functionality while enhancing the user experience in the process flow interface.
This commit is contained in:
parent
84e8d8e42f
commit
fa016ac1b3
@ -1135,7 +1135,9 @@ function fromObject(flowObject) {
|
|||||||
@drop="onDrop"
|
@drop="onDrop"
|
||||||
@dragover="onDragOver"
|
@dragover="onDragOver"
|
||||||
>
|
>
|
||||||
|
<client-only>
|
||||||
<VueFlow
|
<VueFlow
|
||||||
|
v-if="nodes.length > 0"
|
||||||
v-bind="flowOptions"
|
v-bind="flowOptions"
|
||||||
class="bg-slate-50 process-flow"
|
class="bg-slate-50 process-flow"
|
||||||
:nodeTypes="customNodeTypes"
|
:nodeTypes="customNodeTypes"
|
||||||
@ -1192,16 +1194,13 @@ function fromObject(flowObject) {
|
|||||||
<Background pattern-color="#aaa" gap="20" />
|
<Background pattern-color="#aaa" gap="20" />
|
||||||
<Controls />
|
<Controls />
|
||||||
<MiniMap />
|
<MiniMap />
|
||||||
|
|
||||||
<!-- Custom edge template -->
|
<!-- Custom edge template -->
|
||||||
<template #edge-custom="edgeProps">
|
<template #edge-custom="edgeProps">
|
||||||
<InteractiveArrowEdge v-bind="edgeProps" />
|
<InteractiveArrowEdge v-bind="edgeProps" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #edge-label="{ label }">
|
<template #edge-label="{ label }">
|
||||||
<div class="edge-label">{{ label }}</div>
|
<div class="edge-label">{{ label }}</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<Panel position="top-right" class="node-controls">
|
<Panel position="top-right" class="node-controls">
|
||||||
<div class="p-2 bg-white rounded shadow-sm text-sm">
|
<div class="p-2 bg-white rounded shadow-sm text-sm">
|
||||||
<div class="mb-1 font-medium">Controls:</div>
|
<div class="mb-1 font-medium">Controls:</div>
|
||||||
@ -1217,6 +1216,7 @@ function fromObject(flowObject) {
|
|||||||
</div>
|
</div>
|
||||||
</Panel>
|
</Panel>
|
||||||
</VueFlow>
|
</VueFlow>
|
||||||
|
</client-only>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -29,6 +29,12 @@ export default defineNuxtConfig({
|
|||||||
interval: 1000,
|
interval: 1000,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
optimizeDeps: {
|
||||||
|
include: ['vue-toastification'],
|
||||||
|
},
|
||||||
|
ssr: {
|
||||||
|
noExternal: ['vue-toastification'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
head: {
|
head: {
|
||||||
title: "corrad",
|
title: "corrad",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user