Skip to content

@dragcraft/fields-ant-design-vue

该包把 Ant Design Vue 控件映射为 Designer 的字段 adapter。物料定义和组件映射仍从 Designer 创建。

ts
import {
  buildComponentMap,
  getWidgetMetas,
} from '@dragcraft/designer'
import { createAntDesignVueFields } from '@dragcraft/fields-ant-design-vue'

const widgetMetas = getWidgetMetas(definitions)
const componentMap = buildComponentMap(definitions)
const fieldComponentMap = createAntDesignVueFields()
入口用途
createAntDesignVueFields()创建完整字段 adapter map。
antDesignVueFieldComponents读取内置 adapter 定义。
AntDesignVueFieldComponentType获取受支持的稳定字段键。
AntDesignVueFieldComponentPropsMap为字段 componentProps 提供类型提示。

业务特化字段仍由宿主注册到同一份 fieldComponentMap