style: fix some style

This commit is contained in:
夜鹰 2022-07-15 16:17:48 +08:00
parent 155c5fb068
commit 8b63c8ab9a
2 changed files with 35 additions and 33 deletions

View File

@ -15,6 +15,7 @@
</div> </div>
<nz-tree <nz-tree
#nzTreeComponent #nzTreeComponent
nzBlockNode
[nzData]="dataSource" [nzData]="dataSource"
[nzExpandedKeys]="expandedKeys" [nzExpandedKeys]="expandedKeys"
(nzClick)="nzClick($event)" (nzClick)="nzClick($event)"
@ -25,7 +26,8 @@
<span class="text-sm">{{ node.title }}</span> <span class="text-sm">{{ node.title }}</span>
</ng-template> </ng-template>
<ng-template [ngIf]="node.isLeaf"> <ng-template [ngIf]="node.isLeaf">
<span class="text-sm text-blue-400" (click)="insertCode(node)"> {{ node.title }}</span> <div (click)="insertCode(node)">
<span class="text-sm text-blue-400">{{ node.title }}</span>
<ng-container *ngIf="node.origin.note"> <ng-container *ngIf="node.origin.note">
<span <span
[nzTooltipTitle]="titleTemplate" [nzTooltipTitle]="titleTemplate"
@ -54,10 +56,11 @@
</ng-container> </ng-container>
</ng-template> </ng-template>
</ng-container> </ng-container>
</div>
</ng-template> </ng-template>
</ng-template> </ng-template>
</div> </div>
<div class="flex-1"> <div class="flex-1 h-[322px]">
<eo-editor <eo-editor
[(code)]="code" [(code)]="code"
editorType="javascript" editorType="javascript"

View File

@ -22,7 +22,7 @@ export class ApiScriptComponent implements OnInit {
selectListSelection = new SelectionModel<FlatNode>(true); selectListSelection = new SelectionModel<FlatNode>(true);
dataSource: NzTreeNodeOptions[] = []; dataSource: NzTreeNodeOptions[] = [];
expandedKeys = []; expandedKeys = [0];
constructor() {} constructor() {}
@ -54,7 +54,6 @@ export class ApiScriptComponent implements OnInit {
})), })),
...it, ...it,
})); }));
console.log(this.dataSource);
} }
handleChange(code) { handleChange(code) {