mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-27 18:25:58 +08:00
feat(projects): support pinning and unpinning of tabs
This commit is contained in:
@@ -198,6 +198,18 @@ export function getFixedTabIds(tabs: App.Global.Tab[]) {
|
||||
return fixedTabs.map(tab => tab.id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reorder fixed tabs fixedIndex
|
||||
*
|
||||
* @param tabs
|
||||
*/
|
||||
export function reorderFixedTabs(tabs: App.Global.Tab[]) {
|
||||
const fixedTabs = getFixedTabs(tabs);
|
||||
fixedTabs.forEach((t, i) => {
|
||||
t.fixedIndex = i;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Update tabs label
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user