diff --git a/packages/editor/src/type.ts b/packages/editor/src/type.ts index 071553c6..32d27dd0 100644 --- a/packages/editor/src/type.ts +++ b/packages/editor/src/type.ts @@ -18,7 +18,7 @@ import type { Component } from 'vue'; -import type { FormConfig, FormItem } from '@tmagic/form'; +import type { FilterFunction, FormConfig, FormItem } from '@tmagic/form'; import type { CodeBlockContent, CodeBlockDSL, Id, MApp, MContainer, MNode, MPage } from '@tmagic/schema'; import type StageCore from '@tmagic/stage'; import type { @@ -485,3 +485,11 @@ export interface KeyBindingCacheItem { eventType: 'keyup' | 'keydown'; binded: boolean; } + +export interface CodeSelectColConfig { + type: 'code-select-col'; + name: string; + labelWidth?: number | string; + disabled?: boolean | FilterFunction; + display?: boolean | FilterFunction; +} diff --git a/packages/form/src/schema.ts b/packages/form/src/schema.ts index af65dbb7..3c143ac9 100644 --- a/packages/form/src/schema.ts +++ b/packages/form/src/schema.ts @@ -146,7 +146,7 @@ export type TypeFunction = ( }, ) => string; -type FilterFunction = ( +export type FilterFunction = ( mForm: FormState | undefined, data: { model: Record;