This commit is contained in:
X1627315083@163.com
2026-03-18 16:22:16 +08:00
parent 17be81abc9
commit 276115ef65
4 changed files with 221 additions and 15 deletions

View File

@@ -81,6 +81,7 @@
import resultImage from './components/nodes/result-image.vue'
import card from './components/nodes/cards/index.vue'
import text from './components/nodes/text.vue'
import { downImgListToZip } from '../tools/tools'
const components = {
[NODE_COMPONENT.RESULT_IMAGE]: resultImage,
@@ -194,8 +195,19 @@
return JSON.stringify(stateManager.nodes.value)
}
const exportFlow = () => {
console.log(vueFlow.value)
console.log(vueFlow.value.toImage)
// console.log(vueFlow.value)
// console.log(vueFlow.value.toImage)
let arr = stateManager.nodes.value.filter((v) => v.data.type === NODE_COMPONENT.RESULT_IMAGE)
let imgList = []
arr.forEach((v) => {
v.data.data.imageProcessTasks.forEach((item,index) => {
let url = item.url
let name = url?.split(".").pop().split("?").shift();
imgList.push({url:url,name:`${v.data.type}${index == 0?'':index}.${name}`})
})
})
downImgListToZip(imgList)
console.log(imgList)
return
// flowManager.exportFlow()
const str = getFlowJson()