fix
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user