增加工具栏提示。
This commit is contained in:
parent
18150eaa9b
commit
387c4d6ddd
@ -32,16 +32,11 @@ const NodeConfigDrawer: React.FC<NodeConfigDrawerProps> = ({
|
||||
|
||||
useEffect(() => {
|
||||
if (visible && node && nodeDefinition) {
|
||||
// 添加日志
|
||||
console.log('NodeConfigModal - nodeDefinition:', nodeDefinition);
|
||||
console.log('NodeConfigModal - configSchema:', nodeDefinition.graphConfig.configSchema);
|
||||
|
||||
// 获取节点配置
|
||||
const config = node.getProp('config');
|
||||
console.log('NodeConfigModal - node config:', config);
|
||||
|
||||
// 设置表单值
|
||||
form.setFieldsValue(config || {});
|
||||
const currentConfig = {
|
||||
code: node.getProp('code') === undefined ? nodeDefinition.graphConfig.code : node.getProp('code'),
|
||||
...node.getProp('config'),
|
||||
};
|
||||
form.setFieldsValue(currentConfig || {});
|
||||
console.log('NodeConfigModal - form values after set:', form.getFieldsValue());
|
||||
}
|
||||
}, [visible, node, nodeDefinition, form]);
|
||||
|
||||
@ -94,13 +94,6 @@ const WorkflowDesign: React.FC = () => {
|
||||
// 从节点定义列表中找到对应的定义
|
||||
const definition = nodeDefinitions.find(def => def.type === nodeType);
|
||||
if (definition) {
|
||||
console.log('Opening node config:', {
|
||||
type: nodeType,
|
||||
definition: definition,
|
||||
nodeData: node.getData(),
|
||||
nodeProps: node.getProp(),
|
||||
config: node.getProp('config')
|
||||
});
|
||||
setSelectedNode(node);
|
||||
setSelectedNodeDefinition(definition);
|
||||
setConfigModalVisible(true);
|
||||
|
||||
@ -12,6 +12,7 @@ interface ValidationResult {
|
||||
*/
|
||||
const validateNodeConfig = (node: Cell, nodeDefinition: any): ValidationResult => {
|
||||
const config = node.getProp('config');
|
||||
console.log("aaaa", nodeDefinition)
|
||||
const configSchema = nodeDefinition?.graphConfig.configSchema;
|
||||
|
||||
if (!config) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user