feat
This commit is contained in:
@@ -34,8 +34,8 @@ export default defineComponent({
|
||||
|
||||
const goto = (item: RouteRecordRaw) => {
|
||||
// Open external link
|
||||
if (regexUrl.test(item.path)) {
|
||||
openWindow(item.path)
|
||||
if (regexUrl.test(item.path) || item.meta?.isNewTab) {
|
||||
openWindow(`${window.location.origin}/#${item.path}`)
|
||||
selectedKey.value = [item.name as string]
|
||||
return
|
||||
}
|
||||
@@ -45,6 +45,7 @@ export default defineComponent({
|
||||
selectedKey.value = [item.name as string]
|
||||
return
|
||||
}
|
||||
console.log('item', item)
|
||||
// Trigger router change
|
||||
router.push({
|
||||
name: item.name,
|
||||
@@ -114,14 +115,14 @@ export default defineComponent({
|
||||
key={element?.name}
|
||||
v-slots={{
|
||||
icon,
|
||||
title: () => h(compile(t(element?.meta?.locale || ''))),
|
||||
title: () => element?.meta?.locale,
|
||||
}}
|
||||
>
|
||||
{travel(element?.children)}
|
||||
</a-sub-menu>
|
||||
) : (
|
||||
<a-menu-item key={element?.name} v-slots={{ icon }} onClick={() => goto(element)}>
|
||||
{t(element?.meta?.locale || '')}
|
||||
{element?.meta?.locale}
|
||||
</a-menu-item>
|
||||
)
|
||||
nodes.push(node as never)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
</li> -->
|
||||
<li>
|
||||
<!-- <li>
|
||||
<a-tooltip :content="$t('settings.language')">
|
||||
<a-button class="nav-btn" type="outline" :shape="'circle'" @click="setDropDownVisible">
|
||||
<template #icon>
|
||||
@@ -38,7 +38,7 @@
|
||||
</a-doption>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</li>
|
||||
</li> -->
|
||||
<li>
|
||||
<a-tooltip :content="theme === 'light' ? $t('settings.navbar.theme.toDark') : $t('settings.navbar.theme.toLight')">
|
||||
<a-button class="nav-btn" type="outline" :shape="'circle'" @click="handleToggleTheme">
|
||||
|
||||
Reference in New Issue
Block a user