Skip to content

Commit

Permalink
fix(CodePreview): 优化双栏布局内容生成逻辑 (#1741)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyan95 authored Sep 13, 2023
1 parent f260f6d commit 33feb4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/devui-vue/devui/code-review/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ export function parseDiffCode(container: HTMLElement, code: string, outputFormat
newTrStr += `<tr>${leftTdList?.join('')}${rightTdList?.join('')}</tr>`;
}
const tbodyAttr = diffHtmlStr.match(TableTbodyAttrReg)?.[1] || '';
const newDiffHtmlStr = diffHtmlStr.replace(TableTbodyReg, `<tbody ${tbodyAttr}>${newTrStr}</tbody>`);
const emptyDiffHtmlStr = diffHtmlStr.replace(TableTbodyReg, `<tbody${tbodyAttr}></tbody>`);
const index = emptyDiffHtmlStr.indexOf(`<tbody${tbodyAttr}>`);
const newDiffHtmlStr = emptyDiffHtmlStr.slice(0, index) + newTrStr + emptyDiffHtmlStr.slice(index);
diff2HtmlUi.diffHtml = newDiffHtmlStr;
}
diff2HtmlUi.draw();
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-devui",
"version": "1.5.15-feat.1",
"version": "1.5.15-hotfix.1",
"license": "MIT",
"description": "DevUI components based on Vite and Vue3",
"keywords": [
Expand Down

0 comments on commit 33feb4b

Please sign in to comment.