Skip to content

Commit

Permalink
#12
Browse files Browse the repository at this point in the history
  • Loading branch information
TCOTC committed Apr 17, 2024
1 parent c438e3e commit 2764279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function highlightHitResult(value: string, change: boolean) { // 搜索并高亮
// 首先,选取所有符合条件的元素
// const elements = document.querySelectorAll('.layout-tab-container > div:not(.fn__none) .protyle-wysiwyg [data-node-id]');
// 获取文档根,后续直接对全文档文本进行搜索,
const docRoot = document.querySelector('.layout-tab-container > div:not(.fn__none) .protyle-wysiwyg') as HTMLElement;
const docRoot = document.querySelectorAll('.layout-tab-container > div:not(.fn__none) .protyle-wysiwyg') as HTMLElement;
const docText=docRoot.textContent.toLowerCase();
const docLen=docText.length;
Expand Down

0 comments on commit 2764279

Please sign in to comment.