RuleGo-Editor RuleGo-Editor
🏠首页
🧭使用
  • 简介
  • 安装
  • 配置
  • 组件
  • RuleGo-Editor (opens new window)
  • RuleGo-Server (opens new window)
RuleGo (opens new window)
  • English
  • 简体中文
🏠首页
🧭使用
  • 简介
  • 安装
  • 配置
  • 组件
  • RuleGo-Editor (opens new window)
  • RuleGo-Server (opens new window)
RuleGo (opens new window)
  • English
  • 简体中文
  • 简介
  • 安装
  • 配置
  • 节点组件
    目录

    节点组件

    允许通过配置的方式定义编辑器可以拖拽的规则链节点组件及其配置表单。规则链节点组件列表格式, 使用ruleGo 提供获取组件列表API (opens new window) 格式, 该API可以动态扫描注册到RuleGo的规则链节点组件及其表单,但是涉及一些国际化和表单校验规则需要在前端提供。节点组件列表会渲染打左边的工具栏。

    也可以通过修改源文件中:节点组件定义和国际化文件修改节点组件列表: src/components/utils/default.js: 节点组件定义。 src/components/utils/local_zh.js: 节点组件表单国际化定义。

    # ComponentForm

    字段 类型 描述
    type string 组件标识
    category string 组件分类
    fields []ComponentFormField 组件配置表单字段
    label string 组件展示名称
    desc string 组件说明
    icon string 图标,默认使用public/images下的${category}.svg图标
    relationTypes []string 节点与节点连线的选项,如果是空,表示用户可以自定义连接关系

    # ComponentFormField

    字段 类型 描述
    name string 字段名称
    type string 字段类型
    defaultValue any 默认值
    label string 字段展示名称
    desc string 字段详细说明
    rules []rule 字段校验规则
    fields []ComponentFormField 嵌套字段, Type=struct,嵌套字段

    # rule

    通过配置rules,组件允许你验证用户的输入是否符合规范,来帮助你找到和纠正错误。更多高级用法可参考 async-validator (opens new window) 。例子:

    [
     { "required": true, "message": "名称是必须的"}
    ]
    
    1
    2
    3
    上次更新: 2024/08/11, 14:56:01
    配置

    ← 配置

    Theme by Vdoing | Copyright © 2023-2025 RuleGo Team | Apache 2.0 License

    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式