mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-25 10:19:46 +08:00
feat: 修复导入工作流代码时的 JSON 解析问题
This commit is contained in:
@@ -82,9 +82,10 @@ async function updateWorkflow() {
|
||||
function saveCodeString(type: string, code: any) {
|
||||
try {
|
||||
if (code) {
|
||||
const codeObject = JSON.parse(code.value)
|
||||
if (type === 'workflow') {
|
||||
nodes.value = code.actions
|
||||
edges.value = code.flows
|
||||
nodes.value = codeObject.actions || []
|
||||
edges.value = codeObject.flows || []
|
||||
}
|
||||
importCodeDialog.value = false
|
||||
$toast.success('导入成功!')
|
||||
|
||||
Reference in New Issue
Block a user