feat: 搜索功能优化

This commit is contained in:
fofolee 2021-12-31 21:02:42 +08:00
parent 5e2498ce2d
commit 00d3463181
3 changed files with 14 additions and 3 deletions

View File

@ -287,8 +287,11 @@ let setYuQueToken = async () => {
// **************************************************
// *********************底部按钮**********************
// **************************************************
$("#options").on('change', '#searchFts', function () {
searchFeatures($("#searchFts").val())
$("#options").on('keydown', '#searchFts', function (e) {
if (e.keyCode == 13) {
searchFeatures($("#searchFts").val())
e.preventDefault()
}
})
$("#options").on('click', '.footBtn', async function () {
@ -461,7 +464,10 @@ let locateToFeature = (tags, code) => {
redirectTag = "未分类"
}
showFeatureList(redirectTag);
location.href = '#' + code
location.href = '#' + code;
$(`#${code}`).fadeOut(function(){
$(this).fadeIn();
});
}
// 切换TAGS

View File

@ -34,6 +34,10 @@
box-shadow: 0px 0px 9px 0px #000000ab;
}
#options .foot input {
color: #e4e4e4;
}
#options .sidebar .currentTag {
background-color: #484848;
}

View File

@ -342,6 +342,7 @@ body {
border: 1px solid #068506;
border-radius: 5px;
outline: none;
background-color: #eeeeee1f;
}
#options .sidebar {