feat: 完善网址导航功能,支持搜索
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
/** 处理导航链接列表 */
|
||||
export function formatNavLinks() {
|
||||
/**
|
||||
* @description 处理导航链接列表
|
||||
* @param {boolean} withAll 是否添加“全部”项
|
||||
*/
|
||||
export function formatNavLinks(withAll = false) {
|
||||
|
||||
/** @type {NavLinkItem[]} */
|
||||
let list0 = JSON.parse(JSON.stringify(window['NAV_LINK_LIST']));
|
||||
@@ -43,6 +46,14 @@ export function formatNavLinks() {
|
||||
}
|
||||
})(list0, list1);
|
||||
|
||||
if (withAll) {
|
||||
list1.unshift({
|
||||
title: '全部',
|
||||
icon: 'mdi mdi-view-grid',
|
||||
children: JSON.parse(JSON.stringify(list1)),
|
||||
});
|
||||
}
|
||||
|
||||
return list1;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user