mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-01-27 04:18:18 +00:00
1.6 KiB
1.6 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: 数据源事件