-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- refactor(store/task): rename from node - style(utils): jobLeafNode2G6Graph - style(utils): - style(utils): job2G6Tree
- Loading branch information
1 parent
68cd3b3
commit c420825
Showing
8 changed files
with
81 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import {defineStore} from "pinia"; | ||
import {ref} from "vue"; | ||
import {Task} from "@/type.ts"; | ||
import {fetchTool} from "@/api"; | ||
|
||
export const useNodeStore = defineStore("node", () => { | ||
|
||
let _task = ref<Task>({} as Task); | ||
|
||
let isShowed = ref(false); | ||
|
||
async function updateData(task: Task) { | ||
_task.value = task; | ||
// TODO Fetch the tool | ||
// const res = await fetchTool(node.tool.id).data; | ||
const res = ((await fetchTool(_task.value.tool.id)) as { data: any }).data; | ||
_task.value.tool.args = res.args; | ||
} | ||
|
||
function show() { | ||
isShowed.value = true; | ||
} | ||
|
||
function close() { | ||
isShowed.value = false; | ||
} | ||
|
||
return { | ||
task: _task, | ||
isShowed, | ||
updateData, | ||
show, | ||
close, | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters