add_component
Add an ELN form, container, or table component to the current form, with support for nested placement via parent path.
Instructions
向当前表单添加一个组件。支持完整的 ELN 组件体系:
表单组件: Input, Number, TextArea, Select, DatePicker, DatePicker.RangePicker, TimePicker, TimePicker.RangePicker, Switch, Radio, Checkbox, Slider, TreeSelect, Cascader, Transfer
容器/布局: Card, FormGrid, FormGrid.GridColumn, FormLayout, FormCollapse, FormCollapse.CollapsePanel, Space, Tabs, Tabs.TabPane
表格类: Table, TableRow, TableCell, ArrayTable, ArrayTable.Column, ArrayTable.Index, ArrayFixTable, ArrayFixTable.Column, ArrayFixTable.RowTitle
展示/数组: Text, FormattedText, ArrayCards 容器组件可包含子组件,通过 parentPath 指定父级路径。 详细属性配置请参考 Skill 文件: eln-component-catalog
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | 字段标识(唯一),如 "sampleNo"。容器组件也需要唯一 name | |
| type | Yes | 组件类型,如 "Input", "Number", "Card" | |
| title | Yes | 显示标题,如 "样品编号" | |
| display | No | 是否显示 | |
| pattern | No | 展示状态 | |
| required | No | 是否必填 | |
| parentPath | No | 父组件路径(如 "card1" 表示放在 card1 内部),不填则放在根级 | |
| componentProps | No | 组件属性对象,如 { placeholder: "请输入", size: "default" } | |
| decoratorProps | No | 装饰器属性,如 { description: "辅助提示" } |