fix:修复搜索框无法输入中文
This commit is contained in:
parent
1a9239b093
commit
c8a9e2dd60
@ -50,15 +50,14 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
search(content) {
|
search(content) {
|
||||||
content = content.target.value;
|
this.value = content.target.value;
|
||||||
content = content.toLocaleLowerCase().trim();
|
let val = content.target.value.toLocaleLowerCase().trim();
|
||||||
this.value = content;
|
if (val === "") {
|
||||||
if (content === "") {
|
|
||||||
this.list = [];
|
this.list = [];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let time1 = Date.now();
|
let time1 = Date.now();
|
||||||
this.list = this.dealSearch(content);
|
this.list = this.dealSearch(val);
|
||||||
this.selectIndex = 0;
|
this.selectIndex = 0;
|
||||||
console.info("搜索耗时:" + (Date.now() - time1));
|
console.info("搜索耗时:" + (Date.now() - time1));
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user