diff --git a/src/components/LeftMenu.vue b/src/components/LeftMenu.vue index 55060a93f..9a9949499 100644 --- a/src/components/LeftMenu.vue +++ b/src/components/LeftMenu.vue @@ -34,17 +34,13 @@ const pinnedModules = computed(() => { const search = ref(null); const filteredItems = computed(() => { - return filterItems(); -}); -function filterItems() { if (!search.value) return items.value; const normalizedSearch = normalize(search.value); return items.value.filter((item) => { const locale = normalize(t(item.title)); return locale.includes(normalizedSearch); }); -} - +}); const filteredPinnedModules = computed(() => { if (!search.value) return pinnedModules.value; const normalizedSearch = search.value @@ -75,7 +71,7 @@ watch( items.value = []; getRoutes(); }, - { deep: true } + { deep: true }, ); function findMatches(search, item) { @@ -122,7 +118,7 @@ function getMainRoutes() { for (const item of modules) { const moduleDef = routes.find( - (route) => toLowerCamel(route.name) === item.module + (route) => toLowerCamel(route.name) === item.module, ); if (!moduleDef) continue; item.children = []; @@ -233,9 +229,16 @@ const searchModule = () => {