diff --git a/pages/createDocument/edit/[[id]].vue b/pages/createDocument/edit/[[id]].vue index 0bb66f1..0777006 100644 --- a/pages/createDocument/edit/[[id]].vue +++ b/pages/createDocument/edit/[[id]].vue @@ -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 }) }