Commit 67fbd5eb by qlintonger xeno

feat: 使用diff_match_patch来对比完毕+234567

parent 6392064a
...@@ -9,7 +9,7 @@ const renderElem = (type: string, style = { display: 'block' }) => { ...@@ -9,7 +9,7 @@ const renderElem = (type: string, style = { display: 'block' }) => {
const modifyType = (elem as any).modifyType const modifyType = (elem as any).modifyType
Object.assign(style, { Object.assign(style, {
// @ts-ignore // @ts-ignore
textIndent: Number(elem.dataIndent) * 5 + 'px' paddingLeft: Number(elem.dataIndent) * 10 + 'px'
}) })
return h( return h(
type, type,
......
...@@ -20,6 +20,7 @@ export function reconstructTree(data: TreeReconstructed[]): string { ...@@ -20,6 +20,7 @@ export function reconstructTree(data: TreeReconstructed[]): string {
} }
if (data[i].label === 'PARA' || data[i].label === 'TITLE') { if (data[i].label === 'PARA' || data[i].label === 'TITLE') {
nv.textContent = data[i].textContent nv.textContent = data[i].textContent
console.log('indent-here', data[i].chained.length)
} else { } else {
nv.textContent = ' ' nv.textContent = ' '
nv.setAttribute('data-modify-type', 'null-blank') nv.setAttribute('data-modify-type', 'null-blank')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment