completed create all filters type

This commit is contained in:
kur0nek-o
2023-11-02 17:00:17 +07:00
parent 4635106e5d
commit c9e200c174
30 changed files with 770 additions and 119 deletions

View File

@@ -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