diff --git a/docs/en/guide/schema.md b/docs/en/guide/schema.md index d487cde..72a3a64 100644 --- a/docs/en/guide/schema.md +++ b/docs/en/guide/schema.md @@ -80,6 +80,7 @@ interface IElement { postfix?: string; minWidth?: number; underline?: boolean; + extension?: unknown; code: string | null; min?: number; max?: number; diff --git a/docs/guide/schema.md b/docs/guide/schema.md index 7f4ef4f..4617197 100644 --- a/docs/guide/schema.md +++ b/docs/guide/schema.md @@ -80,6 +80,7 @@ interface IElement { postfix?: string; minWidth?: number; underline?: boolean; + extension?: unknown; code: string | null; min?: number; max?: number; diff --git a/src/editor/core/draw/control/Control.ts b/src/editor/core/draw/control/Control.ts index f078cb0..f808725 100644 --- a/src/editor/core/draw/control/Control.ts +++ b/src/editor/core/draw/control/Control.ts @@ -439,6 +439,7 @@ export class Control { } if (type === ControlType.TEXT) { result.push({ + ...element.control, value: textControlValue || null, innerText: textControlValue || null }) @@ -452,6 +453,7 @@ export class Control { .filter(Boolean) .join('') result.push({ + ...element.control, value: code || null, innerText: innerText || null }) diff --git a/src/editor/interface/Control.ts b/src/editor/interface/Control.ts index b50fd8a..35fd59e 100644 --- a/src/editor/interface/Control.ts +++ b/src/editor/interface/Control.ts @@ -30,6 +30,7 @@ export interface IControlBasic { postfix?: string minWidth?: number underline?: boolean + extension?: unknown } export type IControl = IControlBasic & @@ -76,10 +77,10 @@ export interface IGetControlValueOption { conceptId: string } -export type IGetControlValueResult = { +export type IGetControlValueResult = (Omit & { value: string | null innerText: string | null -}[] +})[] export interface ISetControlOption { conceptId: string