refactor: handle url to tab
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
This commit is contained in:
parent
dd2861010e
commit
db9a1d7056
3 changed files with 12 additions and 4 deletions
|
|
@ -15,6 +15,7 @@ defineProps<{
|
|||
hidden?: boolean;
|
||||
disabled?: boolean;
|
||||
isax?: boolean;
|
||||
tab?: string;
|
||||
color:
|
||||
| 'green'
|
||||
| 'red'
|
||||
|
|
@ -28,8 +29,8 @@ defineProps<{
|
|||
}[];
|
||||
}>();
|
||||
|
||||
function navigateTo(destination: string) {
|
||||
router.push(`${destination}`);
|
||||
function navigateTo(destination: string, tab?: string) {
|
||||
router.push({ path: `${destination}`, query: tab ? { tab } : {} });
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -44,7 +45,7 @@ function navigateTo(destination: string) {
|
|||
v-for="(v, i) in list.filter((item) => !item.hidden)"
|
||||
:key="i"
|
||||
:bordered="$q.dark.isActive"
|
||||
@click="!v.disabled && navigateTo(v.value)"
|
||||
@click="!v.disabled && navigateTo(v.value, v.tab)"
|
||||
>
|
||||
<AppCircle
|
||||
:id="`menu-icon-${v.value}`"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue