Skip to content

DataSourceFieldSelect 数据源字段选择器

用于选择数据源字段的级联选择器。

注意

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

基础用法

js
{
  type: 'data-source-field-select',
  name: 'field',
  text: '数据源字段'
}

返回字段key

js
{
  type: 'data-source-field-select',
  name: 'field',
  text: '数据源字段',
  value: 'key'
}

限制字段类型

js
{
  type: 'data-source-field-select',
  name: 'field',
  text: '数据源字段',
  dataSourceFieldType: ['string', 'number']
}

父子节点不关联

js
{
  type: 'data-source-field-select',
  name: 'field',
  text: '数据源字段',
  checkStrictly: true
}

Attributes

参数说明类型可选值默认值
name绑定值string
text表单标签string
disabled是否禁用boolean / FilterFunctionfalse
value返回值类型stringkey/value
checkStrictly是否严格遵守父子节点不互相关联boolean / Function
dataSourceFieldType允许选择的字段类型DataSourceFieldType[]
fieldConfig自定义字段配置ChildConfig
notEditable是否不可编辑数据源(disable控制是否可选择)boolean / FilterFunctionfalse
onChange值变化时触发的函数OnChangeHandler-

value说明

  • key: 不编译,返回数据源id和字段name
  • value: 编译后返回数据源data[field]

Powered by 腾讯视频会员平台技术中心