completed create all filters type
This commit is contained in:
@@ -6,8 +6,10 @@ import { routes } from '@/router'
|
||||
import type { MenuItemModel } from '@/types/menu'
|
||||
import { splitRoutePath } from '@/utils/texts'
|
||||
import { useCommandPalattesStore } from '@/stores/command'
|
||||
import { useFiltersStore } from './filters'
|
||||
|
||||
export const useMenuStore = defineStore('menu', () => {
|
||||
const filters = useFiltersStore()
|
||||
const route = useRoute()
|
||||
const navigation = ref<MenuItemModel[]>([])
|
||||
const sidebarOpen = ref(false)
|
||||
@@ -56,11 +58,16 @@ export const useMenuStore = defineStore('menu', () => {
|
||||
}
|
||||
} else {
|
||||
collapseAllMenu()
|
||||
|
||||
filters.setConfig({
|
||||
type: '',
|
||||
reportButton: false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const expandCurrentActiveMenu = (): void => {
|
||||
const menuData = convertRouteToMenu(routes.at(0)?.children || [])
|
||||
const menuData = convertRouteToMenu(routes[0]?.children || [])
|
||||
navigation.value = menuData
|
||||
menuSelected.value = router.currentRoute.value.fullPath
|
||||
|
||||
|
Reference in New Issue
Block a user