roymondchen 3eb8cc0614 docs: 完善 editor/form/runtime/stage 等 API 文档参数与说明
补全方法的参数类型、返回值类型与详情说明,规范字段编辑器/字段配置/运行时 API 等文档。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-07 17:33:58 +08:00

3.8 KiB

EventSelect 事件选择器

用于配置组件或数据源事件的选择器。

::: warning 注意 此组件仅在编辑器环境中可用,需要配合 @tmagic/editor 使用。 :::

基础用法

{
  type: 'event-select',
  name: 'events',
  text: '事件配置',
  src: 'component'
}

数据源事件

{
  type: 'event-select',
  name: 'events',
  text: '事件配置',
  src: 'datasource'
}

Attributes

参数 说明 类型 可选值 默认值
name 绑定值 string
text 表单标签 string
disabled 是否禁用 boolean / FilterFunction false
src 事件来源 string datasource/component
labelWidth 标签宽度 string
eventNameConfig 事件名称表单配置 FormItem
actionTypeConfig 动作类型配置 FormItem
targetCompConfig 联动组件配置 FormItem
compActionConfig 联动组件动作配置 FormItem
codeActionConfig 联动代码配置 FormItem
dataSourceActionConfig 联动数据源配置 FormItem
onChange 值变化时触发的函数 OnChangeHandler -

src说明

  • component: 组件事件
  • datasource: 数据源事件