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