fix:修复搜索后没有默认选中
This commit is contained in:
parent
295f1f8aff
commit
c85203b8e6
@ -42,11 +42,7 @@ class Search extends React.Component {
|
||||
this.clearTimer();
|
||||
return;
|
||||
}
|
||||
this.clearTimer();
|
||||
this.timer = setTimeout(async () => {
|
||||
await this.search(content);
|
||||
this.clearTimer();
|
||||
}, 200);
|
||||
this.search(content);
|
||||
}
|
||||
|
||||
clearTimer() {
|
||||
@ -63,13 +59,8 @@ class Search extends React.Component {
|
||||
this.setState({ resultList: [] });
|
||||
return;
|
||||
}
|
||||
// httpUtil
|
||||
// .get(
|
||||
// "/bookmark/searchUserBookmark?content=" + encodeURIComponent(content)
|
||||
// )
|
||||
// .then(res => this.setState({ resultList: res }));
|
||||
let resultList = await keySearch(content);
|
||||
this.setState({ resultList });
|
||||
this.setState({ resultList, currentIndex: 0 });
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,7 +4,7 @@ module.exports = function(app) {
|
||||
app.use(
|
||||
proxy("/bookmark/api/**", {
|
||||
target: "http://localhost:8088/",
|
||||
// target: "http://ali.tapme.top:8083/",
|
||||
// target: "http://west.tapme.top:8083/",
|
||||
changeOrigin: true
|
||||
})
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user