快速跳转禁用不实用的模糊搜索

This commit is contained in:
purocean
2019-08-21 10:04:52 +08:00
parent fab809dc4c
commit f48ed05520
+7 -2
View File
@@ -111,7 +111,12 @@ export default {
})
}
},
filterFiles (files, search) {
filterFiles (files, search, fuzzy) {
if (!fuzzy) {
search = search.toLowerCase()
return files.filter(x => x.path.toLowerCase().indexOf(search) > -1)
}
const tmp = []
files.forEach(x => {
@@ -126,7 +131,7 @@ export default {
},
updateDataSource () {
if (this.currentTab === 'file') {
this.list = this.filterFiles(this.files, this.searchText.trim())
this.list = this.filterFiles(this.files, this.searchText.trim(), false)
this.sortList()
} else {
this.list = null