changes
This commit is contained in:
@@ -128,6 +128,7 @@ const emit = defineEmits(["changeTab"]);
|
||||
const { $find, $filter, $store, $snackbar } = useNuxtApp();
|
||||
const lang = computed(() => $store.lang);
|
||||
const menu = $filter($store.common, { category: "topmenu" });
|
||||
const submenus = $filter($store.common, { category: "submenu" });
|
||||
// if($store.rights.length>0) {
|
||||
// menu = menu.filter(v=>$findIndex($store.rights, {setting: v.id})>=0)
|
||||
// }
|
||||
@@ -185,8 +186,9 @@ function openProfile() {
|
||||
title: $store.lang === "vi" ? "Thông tin cá nhân" : "User profile",
|
||||
});
|
||||
}
|
||||
const found = route.query.tab && $find(menu, { code: route.query.tab });
|
||||
if (found || currentTab.value) changeTab(found || currentTab.value);
|
||||
const foundTab = route.query.tab && $find(menu, { code: route.query.tab });
|
||||
const foundSub = route.query.subtab && $find(submenus, { code: route.query.subtab });
|
||||
if (foundTab || currentTab.value) changeTab(foundTab || currentTab.value, foundSub);
|
||||
|
||||
onMounted(() => {
|
||||
if (!$store.login) return;
|
||||
|
||||
Reference in New Issue
Block a user