feat:add checkbox control menu

This commit is contained in:
Hufe921
2022-04-15 21:45:19 +08:00
parent 1315ce070b
commit 440db738cb
5 changed files with 40 additions and 6 deletions
+1
View File
@@ -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]
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -162,7 +162,7 @@ export function formatElementList(elementList: IElement[], options: IFormatEleme
}
}
}
} else {
} else if (placeholder) {
// placeholder
const thePlaceholderArgs: Pick<IElement, 'color'> = {}
if (editorOptions && editorOptions.control) {