diff --git a/src/editor/core/draw/particle/ListParticle.ts b/src/editor/core/draw/particle/ListParticle.ts index e87fb4d..ea12c97 100644 --- a/src/editor/core/draw/particle/ListParticle.ts +++ b/src/editor/core/draw/particle/ListParticle.ts @@ -78,9 +78,7 @@ export class ListParticle { if (startElement.value !== ZERO || startElement.listWrap) return let text = '' if (startElement.listType === ListType.UL) { - if (startElement.listStyle) { - text = ulStyleMapping[startElement.listStyle] || ulStyleMapping[UlStyle.DISC] - } + text = ulStyleMapping[startElement.listStyle] || ulStyleMapping[UlStyle.DISC] } else { text = `${listIndex! + 1}${KeyMap.PERIOD}` } diff --git a/src/editor/utils/element.ts b/src/editor/utils/element.ts index 5d1d245..43be8d0 100644 --- a/src/editor/utils/element.ts +++ b/src/editor/utils/element.ts @@ -56,8 +56,10 @@ export function formatElementList(elementList: IElement[], options: IFormatEleme const titleOptions = editorOptions.title for (let v = 0; v < valueList.length; v++) { const value = valueList[v] - value.titleId = titleId - value.level = el.level + if (el.level) { + value.titleId = titleId + value.level = el.level + } // 文本型元素设置字体及加粗 if (isTextLikeElement(value)) { if (!value.size) {