|
@@ -49,8 +49,12 @@ function localHideList() {
|
|
|
removeLocalCache(uphlname);
|
|
|
setLocalCache('pro_'+ pid + '_category_list', cate);
|
|
|
}
|
|
|
+ setTopTr();
|
|
|
+}
|
|
|
+// 设置表头固定并动态调整宽度高度
|
|
|
+function setTopTr() {
|
|
|
for(let item = 0; item < $(".c-body table>thead>tr>th").length; item ++) {
|
|
|
- $(".c-body table>thead>tr>th").eq(item).outerWidth($(".c-body table>tbody>tr:last").children('td').eq(item).outerWidth());
|
|
|
+ $(".c-body table>thead>tr>th").eq(item).outerWidth($(".c-body table>tbody>tr:first").children('td').eq(item).outerWidth());
|
|
|
}
|
|
|
$('.c-body table').css('margin-top', $(".c-body table>thead").height() - 4);
|
|
|
}
|
|
@@ -111,6 +115,7 @@ $(document).ready(() => {
|
|
|
hideList.splice(index, 1);
|
|
|
setLocalCache(uphlname, JSON.stringify(hideList));
|
|
|
}
|
|
|
+ setTopTr();
|
|
|
});
|
|
|
|
|
|
// 一键展开和收起
|
|
@@ -135,6 +140,7 @@ $(document).ready(() => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ setTopTr();
|
|
|
})
|
|
|
});
|
|
|
|