Skip to content

Commit

Permalink
优化了自动流发布功能,精简了发布信息
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-human authored Jul 16, 2024
1 parent dac5e58 commit b899e84
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion index/flow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -760,14 +760,22 @@
export_autoAI_file = (name) => {
let flow = (editor.export()).drawflow.Home.data

console.dir(flow)
// 先清理flow中的html、pos_x、pos_y、typenode等无用数据
for (i in flow) {
delete flow[i].html
delete flow[i].pos_x
delete flow[i].pos_y
delete flow[i].typenode
// delete flow[i].data

console.log(flow[i])
for (tp in flow[i].data) {
// console.dir('tp:' + tp)
delete flow[i].data[tp].background
delete flow[i].data[tp].debug

}
// console.log(flow[i])
}

str = `// @namespace http://tampermonkey.net/
Expand All @@ -793,6 +801,7 @@
// 生成文件并下载
downloadBlob(name + ".js", str)
}

save_autoAI_file = (name) => {
let flow = (editor.export()).drawflow.Home.data

Expand Down

0 comments on commit b899e84

Please sign in to comment.