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