添加系统绑的功能

This commit is contained in:
guanj
2026-01-05 16:34:42 +08:00
parent 75987c0c6f
commit d25f16bcc7
13 changed files with 502 additions and 401 deletions

View File

@@ -25,7 +25,6 @@ export const useNavTabs = defineStore(
})
function addTab(route: RouteLocationNormalized) {
console.log('🚀 ~ addTab ~ route:', route)
if (!route.meta.addtab) return
for (const key in state.tabsView) {
if (state.tabsView[key].path === route.path) {
@@ -69,7 +68,7 @@ export const useNavTabs = defineStore(
}
const setTabsViewRoutes = (data: RouteRecordRaw[]): void => {
state.tabsViewRoutes = encodeRoutesURI(data)
state.tabsViewRoutes = encodeRoutesURI(JSON.parse(JSON.stringify(data)))
}
const setAuthNode = (key: string, data: string[]) => {
@@ -87,9 +86,9 @@ export const useNavTabs = defineStore(
const refresh = () => {
// setTimeout(() => {
// console.log(123, state.tabsViewRoutes)
let list = matchAndReturnRouteData(state.tabsViewRoutes, state.tabsView)
state.tabsView = []
state.tabsView = []
list.forEach(item => {
addTab(item)
})