This commit is contained in:
X1627315083@163.com
2026-03-17 11:06:32 +08:00
parent 9aa9c8193c
commit 2ad392037e
5 changed files with 27 additions and 10 deletions

View File

@@ -146,7 +146,7 @@
const { layout } = useLayout()
const index = ref(0)
async function layoutGraph(direction) {
if (props.config.json > 0) return
if (props.config.json.length > 0) return
if (index.value > 0) return
index.value++
setTimeout(() => {
@@ -187,10 +187,14 @@
stateManager.sendToBack(id)
}
// 导出流程
const getFlowJson = () => {
if(!stateManager.isSave.value)return ''
return JSON.stringify(stateManager.nodes.value)
}
const exportFlow = () => {
// flowManager.exportFlow()
const str = JSON.stringify(stateManager.nodes.value)
const str = getFlowJson()
stateManager.isSave.value = false
emit('exportFlow', str)
// localStorage.setItem('flow_json', str)
}
@@ -259,6 +263,9 @@
nodeManager.dispose()
toolManager.dispose()
})
defineExpose({
getFlowJson
})
</script>
<style lang="less">
@import '@vue-flow/core/dist/style.css';