mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-24 19:39:27 +08:00
bugfix: 修复windows下读取插件preload.js位置问题;
ref:搜索插件不区分大消息
This commit is contained in:
@@ -305,7 +305,7 @@ export default {
|
||||
|
||||
renderTitle(title) {
|
||||
if (typeof title !== "string") return;
|
||||
const result = title.split(this.searchValue);
|
||||
const result = title.toLowerCase().split(this.searchValue.toLowerCase());
|
||||
if (result && result.length > 1) {
|
||||
return `<div>${result[0]}<span style="color: red">${this.searchValue}</span>${result[1]}</div>`;
|
||||
} else {
|
||||
|
||||
@@ -24,8 +24,8 @@ function getWindowHeight(searchList) {
|
||||
|
||||
function searchKeyValues(lists, value) {
|
||||
return lists.filter((item) => {
|
||||
if (typeof item === 'string') return item.indexOf(value) >= 0;
|
||||
return item.type.indexOf(value) >= 0;
|
||||
if (typeof item === 'string') return item.toLowerCase().indexOf(value.toLowerCase()) >= 0;
|
||||
return item.type.toLowerCase().indexOf(value.toLowerCase()) >= 0;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user