mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(devtools): links to docs in property view tab
This commit is contained in:
+5
@@ -4,6 +4,11 @@
|
||||
<mat-expansion-panel-header collapsedHeight="25px" expandedHeight="25px">
|
||||
<mat-panel-title>
|
||||
{{ panels[index].title }}
|
||||
<a href="{{ panels[index].documentation }}" target="_blank">
|
||||
<mat-icon class="docs-link">
|
||||
link
|
||||
</mat-icon>
|
||||
</a>
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
<ng-property-view-tree
|
||||
|
||||
+7
@@ -14,6 +14,13 @@
|
||||
|
||||
.mat-expansion-panel-header {
|
||||
padding: 0 15px;
|
||||
|
||||
.docs-link {
|
||||
height: inherit;
|
||||
width: fit-content;
|
||||
font-size: initial;
|
||||
padding-left: 0.1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-expansion-panel-header-title {
|
||||
|
||||
+4
-1
@@ -22,22 +22,25 @@ export class PropertyViewBodyComponent {
|
||||
|
||||
categoryOrder = [0, 1, 2];
|
||||
|
||||
get panels(): { title: string; hidden: boolean; controls: DirectiveTreeData }[] {
|
||||
get panels(): { title: string; hidden: boolean; controls: DirectiveTreeData; documentation: string }[] {
|
||||
return [
|
||||
{
|
||||
title: '@Inputs',
|
||||
hidden: this.directiveInputControls.dataSource.data.length === 0,
|
||||
controls: this.directiveInputControls,
|
||||
documentation: 'https://angular.io/api/core/Input',
|
||||
},
|
||||
{
|
||||
title: '@Outputs',
|
||||
hidden: this.directiveOutputControls.dataSource.data.length === 0,
|
||||
controls: this.directiveOutputControls,
|
||||
documentation: 'https://angular.io/api/core/Output',
|
||||
},
|
||||
{
|
||||
title: 'Properties',
|
||||
hidden: this.directiveStateControls.dataSource.data.length === 0,
|
||||
controls: this.directiveStateControls,
|
||||
documentation: 'https://angular.io/guide/property-binding',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user