ZHIWEI666 commited on
Commit
de9ee82
·
verified ·
1 Parent(s): 47a61f4

Upload 104 files

Browse files
前端页面/core/侧边栏主程序.js CHANGED
@@ -702,11 +702,17 @@ export function buildSidebarDOM() {
702
  }
703
  };
704
 
 
 
 
 
 
 
 
705
  // 初始化筛选控件显示状态
706
  updateFilterVisibility(currentTab);
707
 
708
- sortContainer.querySelector("#hub-sort-select").value = currentSort;
709
- sortContainer.querySelector("#hub-sort-select").onchange = (e) => { currentSort = e.target.value; Store.save("activeSort", currentSort); triggerLoad(); };
710
 
711
  // 🔍 搜索防抖:300ms 延迟,避免每次按键都发起网络请求
712
  searchDebounce = debounce(() => {
 
702
  }
703
  };
704
 
705
+ const hubSortSelect = sortContainer.querySelector("#hub-sort-select");
706
+ hubSortSelect.value = currentSort;
707
+ if (!hubSortSelect.value) {
708
+ currentSort = hubSortSelect.options[0].value;
709
+ hubSortSelect.value = currentSort;
710
+ Store.save("activeSort", currentSort);
711
+ }
712
  // 初始化筛选控件显示状态
713
  updateFilterVisibility(currentTab);
714
 
715
+ hubSortSelect.onchange = (e) => { currentSort = e.target.value; Store.save("activeSort", currentSort); triggerLoad(); };
 
716
 
717
  // 🔍 搜索防抖:300ms 延迟,避免每次按键都发起网络请求
718
  searchDebounce = debounce(() => {