Skip to content

Commit 24b4b5b

Browse files
committed
【fix】修复doc搜索问题
1 parent a7abcfa commit 24b4b5b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

build/jsdocs/template/static/scripts/main.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$(function () {
22
$('.navigationDiv').load("nav.html .main-sidebar", null, function () {
3-
// var height = $('.sidebar').height();
4-
// $('.main-sidebar #categories').css('height', height - 72 + 'px');
3+
var height = $('.sidebar').height();
4+
$('.main-sidebar #categories').css('height', height - 125 + 'px');
55
// Search Items
66
$('#searchBox').on('keyup', function (e) {
77

@@ -99,8 +99,8 @@ $(function () {
9999
})
100100

101101
});
102-
// $(window).resize(function () {
103-
// var height = $('.navigationDiv .sidebar').height();
104-
// $('.main-sidebar #categories').css('height', height - 72 + 'px');
105-
// })
102+
$(window).resize(function () {
103+
var height = $('.navigationDiv .sidebar').height();
104+
$('.main-sidebar #categories').css('height', height - 125 + 'px');
105+
})
106106
});

build/jsdocs/template/tmpl/navigation.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function buildLi(obj){
151151
<input id="searchBox" type="text" class="form-control input-sm" placeholder="Search Documentations">
152152
<div class="split-line"></div>
153153
</div>
154-
<div style='width: 100%;position: absolute;top: 0px;bottom: 0px;left: 0px;padding-top:125px;height:100%' id='categories'>
154+
<div style='width: 100%;position: absolute;top: 0px;bottom: 0px;left: 0px;margin-top:125px;height:100%' id='categories'>
155155
<div style='height:100%;overflow:auto'>
156156
<ul class="sidebar-menu tree list" data-widget='tree'>
157157
<?js

0 commit comments

Comments
 (0)