mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Fix:修复搜索内容为全部替换内容的子串时连续点击全部替换搜索结果异常的问题
This commit is contained in:
parent
ac5bb1d684
commit
b1303ce7a5
@ -515,4 +515,8 @@ const mindMap = new MindMap({
|
||||
<img src="./web/src/assets/avatar/一亩三.jpg" style="width: 50px;height: 50px;" />
|
||||
<span>一亩三</span>
|
||||
</span>
|
||||
<span>
|
||||
<img src="./web/src/assets/avatar/xbkkjbs0246658.png" style="width: 50px;height: 50px;" />
|
||||
<span>xbkkjbs0246658</span>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
@ -257,6 +257,7 @@ class Search {
|
||||
replaceText = String(replaceText)
|
||||
// 如果当前搜索文本是替换文本的子串,那么该节点还是符合搜索结果的
|
||||
const keep = replaceText.includes(this.searchText)
|
||||
this.notResetSearchText = true
|
||||
const hasRichTextPlugin = this.mindMap.renderer.hasRichTextPlugin()
|
||||
this.matchNodeList.forEach(node => {
|
||||
const text = this.getReplacedText(node, this.searchText, replaceText)
|
||||
|
||||
BIN
web/src/assets/avatar/xbkkjbs0246658.png
Normal file
BIN
web/src/assets/avatar/xbkkjbs0246658.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
Loading…
Reference in New Issue
Block a user