Skip to content
导航栏

Form里显示子表

可在以Form显示子表内容,可惜无法在子表里增加新条目。

  • 配置字段的类型为:type:Table
  • 配置字段属性edit.props.modelTable的标识
  • 配置表的筛选条件edit.props.query
json
{
  "fileds": {
    "form": {
      "消息列表": {
        "edit": {
          "props": {
            "model": "chat.message_simple",
            "query": {
              "select": "id,prompt,completion,request_total_time",
              "where.conversation_id.eq": "{{id}}"
            }
          },
          "type": "Table"
        }
      }
    }
  }
}

效果: table_in_form

如果需要在Form里增加新内容,可以使用List控件。