1.删除前言两字间的空格,章序号与章标题间空2个字符
This commit is contained in:
@@ -527,7 +527,6 @@ export default {
|
|||||||
oParagraphTwo.SetJc('center')
|
oParagraphTwo.SetJc('center')
|
||||||
oParagraphTwo.SetBold(false)
|
oParagraphTwo.SetBold(false)
|
||||||
oDocument.InsertContent([oParagraphTwo])
|
oDocument.InsertContent([oParagraphTwo])
|
||||||
|
|
||||||
Api.asc_AddTableOfContents()
|
Api.asc_AddTableOfContents()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
@@ -1286,8 +1285,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// this.equationOne()
|
this.equationOne()
|
||||||
|
|
||||||
this.replaceData()
|
this.replaceData()
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
@@ -1793,17 +1791,31 @@ export default {
|
|||||||
if (list && list.length > 0) {
|
if (list && list.length > 0) {
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
list[i].SetFontFamily('宋体')
|
list[i].SetFontFamily('宋体')
|
||||||
if (list[i].GetText().indexOf('前 言')!= -1){
|
if (list[i].GetText().indexOf('前 言') != -1 || list[i].GetText().indexOf('前言') != -1){
|
||||||
let text = list[i].GetText()
|
let text = list[i].GetText()
|
||||||
text = text.replace(/\s*/g, '')
|
text = text.replace(/\s*/g, '')
|
||||||
text = text.substring(0, 2)
|
text = text.substring(0, 2)
|
||||||
oDocument.SearchAndReplace({ 'searchString': '前 言 ', 'replaceString': text })
|
var aSearch = list[i].Search("前 言");
|
||||||
|
aSearch[0].AddText('前言')
|
||||||
|
var aSearch1 = list[i].Search("前 言");
|
||||||
|
aSearch1[0].Delete()
|
||||||
|
// var aSearch2 = list[i].Search("4");
|
||||||
|
// aSearch2[0].AddText('Ⅰ')
|
||||||
|
// var aSearch3 = list[i].Search("4");
|
||||||
|
// aSearch3[0].Delete()
|
||||||
}
|
}
|
||||||
if (list[i].GetText().indexOf('引 言')!= -1){
|
if (list[i].GetText().indexOf('引 言') != -1 || list[i].GetText().indexOf('引言') != -1){
|
||||||
let text = list[i].GetText()
|
let text = list[i].GetText()
|
||||||
text = text.replace(/\s*/g, '')
|
text = text.replace(/\s*/g, '')
|
||||||
text = text.substring(0, 2)
|
text = text.substring(0, 2)
|
||||||
oDocument.SearchAndReplace({ 'searchString': '引 言 ', 'replaceString': text })
|
var aSearch = list[i].Search("引 言");
|
||||||
|
aSearch[0].AddText('引言')
|
||||||
|
var aSearch1 = list[i].Search("引 言");
|
||||||
|
aSearch1[0].Delete()
|
||||||
|
// var aSearch2 = list[i].Search("5");
|
||||||
|
// aSearch2[0].AddText('Ⅱ')
|
||||||
|
// var aSearch3 = list[i].Search("5");
|
||||||
|
// aSearch3[0].Delete()
|
||||||
}
|
}
|
||||||
if (list[i].GetText().indexOf('附 录') != -1 || list[i].GetText().indexOf('附录') != -1) {
|
if (list[i].GetText().indexOf('附 录') != -1 || list[i].GetText().indexOf('附录') != -1) {
|
||||||
let text = list[i].GetText()
|
let text = list[i].GetText()
|
||||||
|
|||||||
Reference in New Issue
Block a user