Skip to content

Commit

Permalink
fix: set navbar a default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayden12138 committed Jul 8, 2024
1 parent c2d93ba commit 9502ca4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions apps/client/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<a
class="text-nowrap hover:text-purple-600 dark:text-white dark:hover:text-purple-400"
:href="optItem.href"
:target="optItem.target ?? optItem.target"
:target="optItem.target ?? '_self'"
>
{{ optItem.name }}
</a>
Expand Down Expand Up @@ -109,8 +109,14 @@ const isShowModal = ref(false);
const isOpenUserMenu = ref(false);
const SCROLL_THRESHOLD = 8;
const HEADER_OPTIONS = [
{ name: "文档", href: runtimeConfig.public.helpDocsURL, target: "_blank" },
// https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/a#%E5%B1%9E%E6%80%A7
interface AnchorAttributes extends Record<string, any> {
href: string;
target?: string;
download?: string;
}
const HEADER_OPTIONS: AnchorAttributes[] = [
{ name: "文档", href: runtimeConfig.public.helpDocsURL as string, target: "_blank" },
{ name: "功能", href: "#features" },
{ name: "问题", href: "#faq" },
{ name: "联系我们", href: "#contact" },
Expand Down

0 comments on commit 9502ca4

Please sign in to comment.