Merge pull request #154 from richex-cn/fix-web-case-sensitive

fix: 修复无法搜索大写字母的问题
This commit is contained in:
any86 2021-03-08 09:13:54 +08:00 committed by GitHub
commit 479f5d3f6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,7 +185,7 @@ export default {
search() { search() {
if ('' !== this.keyword) { if ('' !== this.keyword) {
this.rules = this.rules.filter(({ title }) => -1 !== title.indexOf(this.keyword.toLowerCase())); this.rules = this.rules.filter(({ title }) => -1 !== title.toLowerCase().indexOf(this.keyword.toLowerCase()));
} else { } else {
this.rules = RULES; this.rules = RULES;
} }