Skip to content

Commit

Permalink
perf: 优化首页
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBeard30 committed Apr 3, 2024
1 parent 1237539 commit 4f5e038
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
20 changes: 18 additions & 2 deletions src/app/pages/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<app-designer>
<app-workbench>
<app-studio-panel>
<p logo>logo</p>
<div action>action</div>
<ng-container logo *ngTemplateOutlet="logo"></ng-container>
<ng-container action *ngTemplateOutlet="action"></ng-container>
<app-composite-panel>
<app-composite-panel-item title="panels.Component" icon="Component">
<app-resource title="sources.Inputs" [sources]="resourceList"></app-resource>
Expand All @@ -29,3 +29,19 @@
</app-studio-panel>
</app-workbench>
</app-designer>

<ng-template #logo>
<p class="mb-0 text-lg text-transparent bg-clip-text bg-gradient-to-r from-[#8514f5] via-[#f637e3] to-[#fa2c05]">dynamic form designer</p>
</ng-template>

<ng-template #action>
<div class="flex ml-2 gap-2 h-10 items-center">
<nz-radio-group [(ngModel)]="language">
<label nz-radio-button nzValue="English">English</label>
<label nz-radio-button nzValue="中文">中文</label>
</nz-radio-group>

<button nz-button>保存</button>
<button nzType="primary" nz-button>发布</button>
</div>
</ng-template>
1 change: 1 addition & 0 deletions src/app/pages/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import { ComponentTreeWidget } from '@/app/components/widgets/component-tree/com
})
export class HomeComponent implements OnInit {
resourceList: IResourceLike[] = [];
language: string = '中文';
constructor() {}

ngOnInit(): void {
Expand Down
3 changes: 2 additions & 1 deletion src/app/shared/shared.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzEmptyModule } from 'ng-zorro-antd/empty';
import { NzRadioModule } from 'ng-zorro-antd/radio';

const ZORRO_MODULES = [NzButtonModule, NzEmptyModule];
const ZORRO_MODULES = [NzButtonModule, NzEmptyModule, NzRadioModule];

@NgModule({
declarations: [],
Expand Down

0 comments on commit 4f5e038

Please sign in to comment.