mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-25 03:49:26 +08:00
bugfix: 修复中文搜索bug
This commit is contained in:
@@ -9,7 +9,6 @@ import { APP_FINDER_PATH } from './constans';
|
||||
import { getlocalDataFile } from '../../../main/common/utils';
|
||||
import iconvLite from 'iconv-lite';
|
||||
import bpList from 'bplist-parser';
|
||||
import pinyin from 'pinyin';
|
||||
|
||||
const store = new Store();
|
||||
|
||||
@@ -234,12 +233,8 @@ APP_FINDER_PATH.forEach((searchPath, index) => {
|
||||
};
|
||||
|
||||
if (appZhName && isZhRegex.test(appZhName)) {
|
||||
const pinyinArr = pinyin(appZhName, { style: pinyin.STYLE_NORMAL });
|
||||
// pinyinArr = [['pin'], ['yin']]
|
||||
const firstLetterArr = pinyinArr.map((str) => str[0][0]);
|
||||
fileOptions.keyWords.push(appZhName);
|
||||
fileOptions.keyWords.push(pinyinArr.join(''));
|
||||
fileOptions.keyWords.push(firstLetterArr.join(''));
|
||||
}
|
||||
|
||||
fileLists.push({
|
||||
|
||||
Reference in New Issue
Block a user