fix: blog 链接用新标签显示
This commit is contained in:
parent
72b1aff4e7
commit
15cf692bd9
@ -19,6 +19,7 @@
|
||||
{
|
||||
"url": "https://blog.wangke.io/",
|
||||
"title": "译者博客",
|
||||
"external": true,
|
||||
"tooltip": "译者汪志成的博客,包括翻译文章和原创文章"
|
||||
},
|
||||
{
|
||||
|
@ -11,11 +11,12 @@ import { NavigationNode } from 'app/navigation/navigation.service';
|
||||
template: `
|
||||
<ul role="navigation">
|
||||
<li *ngFor="let node of nodes">
|
||||
<a class="nav-link" [class.highlight]="node.highlight" [href]="node.url" [title]="node.title">
|
||||
<a class="nav-link" [class.highlight]="node.highlight" [href]="node.url" [title]="node.tooltip || node.title"
|
||||
[target]="node.external?'_blank':null">
|
||||
<span class="nav-link-inner">{{ node.title }}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>`
|
||||
</ul>`,
|
||||
})
|
||||
export class TopMenuComponent {
|
||||
@Input() nodes: NavigationNode[];
|
||||
|
@ -14,6 +14,7 @@ export interface NavigationNode {
|
||||
hidden?: boolean;
|
||||
divider?: boolean;
|
||||
highlight?: boolean;
|
||||
external?: boolean;
|
||||
children?: NavigationNode[];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user