Skip to content

Commit

Permalink
修复了 uni-app 包 vue3 使用 search 扩展可能导致错误换行的问题 #449
Browse files Browse the repository at this point in the history
  • Loading branch information
jin-yufeng committed Aug 20, 2022
1 parent 0b3b585 commit c84663f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/search/uni-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Search (vm) {
name: 'span',
attrs: {},
type: 'node',
c: anchor ? 1 : undefined,
c: 1,
s: 1,
children: []
}
Expand All @@ -44,6 +44,9 @@ function Search (vm) {
id: anchor ? 'search' + (res.length + 1) : undefined, // 用于锚点的 id
style: style
},
// #ifdef VUE3
c: 1,
// #endif
children: [{
type: 'text',
text: key instanceof RegExp ? key.exec(text)[0] : key
Expand Down

0 comments on commit c84663f

Please sign in to comment.