value of vars in node fetching

This commit is contained in:
jZonG 2025-04-29 17:18:00 +08:00
parent 8a910a40a4
commit 2287a6e090
3 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
import { fetchNodeInspectVars } from '@/service/workflow'
import { useWorkflowStore } from '../store'
import { useStore, useWorkflowStore } from '../store'
import type { ValueSelector } from '../types'
import { VarInInspectType } from '@/types/workflow'
import {
@ -17,9 +17,9 @@ import { useCallback, useEffect, useState } from 'react'
const useInspectVarsCrud = () => {
const workflowStore = useWorkflowStore()
const nodesWithInspectVars = useStore(s => s.nodesWithInspectVars)
const {
appId,
nodesWithInspectVars,
getNodeInspectVars,
setNodeInspectVars,
setInspectVarValue,

View File

@ -6,7 +6,7 @@ export const vars: VarInInspect[] = [
{
id: 'xxx',
type: VarInInspectType.node,
name: 'text',
name: 'text00',
description: '',
selector: ['1745476079387', 'text'],
value_type: VarType.string,

View File

@ -90,5 +90,7 @@ export const fetchAllInspectVars = async (appId: string): Promise<VarInInspect[]
export const fetchNodeInspectVars = async (appId: string, nodeId: string): Promise<VarInInspect[]> => {
// TODO
console.log('fetchNodeInspectVars', appId, nodeId)
return []
await sleep(1000)
const data = await Promise.resolve(vars)
return data
}