Some Changes in Pos Numbering
This commit is contained in:
@@ -429,22 +429,17 @@ const onChangeTab = (index) => {
|
||||
}
|
||||
|
||||
const setPosNumbers = () => {
|
||||
let mainIndex = 0
|
||||
let mainIndex = 1
|
||||
let subIndex = 1
|
||||
let index = 1
|
||||
let rows = itemInfo.value.rows.map(row => {
|
||||
if(row.mode === 'title') {
|
||||
mainIndex += 1
|
||||
row.pos = mainIndex
|
||||
mainIndex += 1
|
||||
subIndex = 1
|
||||
} else if(!['pagebreak','title','text'].includes(row.mode)) {
|
||||
row.pos = `${mainIndex}.${subIndex}`
|
||||
row.pos = itemInfo.value.rows.filter(i => i.mode === "title").length === 0 ? `${subIndex}` :`${ mainIndex - 1}.${subIndex}`
|
||||
subIndex += 1
|
||||
}
|
||||
/*if(!['pagebreak','title','text'].includes(row.mode)) {
|
||||
row.pos = index
|
||||
index += 1
|
||||
}*/
|
||||
return row
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user