fix 保存后编号空格问题

This commit is contained in:
赵霄
2024-04-26 19:18:51 +08:00
parent 30907bea8c
commit 3d2fc6c024
@@ -86,7 +86,7 @@ export default {
const oDocument = Api.GetDocument() const oDocument = Api.GetDocument()
let oNumbering = oDocument.CreateNumbering('bullet') let oNumbering = oDocument.CreateNumbering('bullet')
const oNumLvl = oNumbering.GetLevel(0) const oNumLvl = oNumbering.GetLevel(0)
oNumLvl.SetSuff('tab') oNumLvl.SetSuff('none')
const oParagraph = Api.CreateParagraph() const oParagraph = Api.CreateParagraph()
var oParaPr = oNumLvl.GetParaPr() var oParaPr = oNumLvl.GetParaPr()
oParaPr.SetSpacingLine(280, 'auto') oParaPr.SetSpacingLine(280, 'auto')
@@ -96,6 +96,7 @@ export default {
oParagraph.SetFontSize(21) oParagraph.SetFontSize(21)
oParagraph.SetIndLeft(1270) oParagraph.SetIndLeft(1270)
oParagraph.SetHighlight(255, 255, 0) oParagraph.SetHighlight(255, 255, 0)
oParagraph.AddText(' ')
oDocument.InsertContent([oParagraph]) oDocument.InsertContent([oParagraph])
let text = oParagraph.GetText() let text = oParagraph.GetText()
if (text) { if (text) {