diff --git a/index.html b/index.html index 68a38c4..d72c7e6 100644 --- a/index.html +++ b/index.html @@ -164,8 +164,9 @@
diff --git a/src/editor/core/draw/control/Control.ts b/src/editor/core/draw/control/Control.ts index 0073a2a..a2ce8e8 100644 --- a/src/editor/core/draw/control/Control.ts +++ b/src/editor/core/draw/control/Control.ts @@ -274,6 +274,7 @@ export class Control { const elementList = this.getElementList() const startElement = elementList[startIndex] const control = startElement.control! + if (!control.placeholder) return const placeholderStrList = control.placeholder.split('') for (let p = 0; p < placeholderStrList.length; p++) { const value = placeholderStrList[p] diff --git a/src/editor/interface/Control.ts b/src/editor/interface/Control.ts index a691311..d14d7f6 100644 --- a/src/editor/interface/Control.ts +++ b/src/editor/interface/Control.ts @@ -23,7 +23,7 @@ export interface IControlCheckbox { export interface IControlBasic { type: ControlType; value: IElement[] | null; - placeholder: string; + placeholder?: string; conceptId?: string; prefix?: string; postfix?: string; diff --git a/src/editor/utils/element.ts b/src/editor/utils/element.ts index 88bf7f1..dcaa900 100644 --- a/src/editor/utils/element.ts +++ b/src/editor/utils/element.ts @@ -162,7 +162,7 @@ export function formatElementList(elementList: IElement[], options: IFormatEleme } } } - } else { + } else if (placeholder) { // placeholder const thePlaceholderArgs: Pick