Skip to content

Commit

Permalink
feat: 添加空白组件
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBeard30 committed Mar 4, 2024
1 parent 67c1080 commit a80ae88
Show file tree
Hide file tree
Showing 17 changed files with 2,721 additions and 11 deletions.
16 changes: 16 additions & 0 deletions src/app/components/container/simulator.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { PcSimulatorComponent } from '../simulators/pc-simulator/pc-simulator.component';

@Component({
selector: 'app-simulator',
template: `
<app-pc-simulator>
<ng-content></ng-content>
</app-pc-simulator>
`,
styles: [``],
standalone: true,
imports: [PcSimulatorComponent],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class SimulatorComponent {}
6 changes: 5 additions & 1 deletion src/app/components/container/viewport.component.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import { usePrefix } from '../../utils';
import { AuxToolWidget } from '@/app/components/widgets/aux-tool/aux-tool.widget';
import { EmptyWidget } from '@/app/components/widgets/empty/empty.widget';

@Component({
selector: 'app-viewport',
standalone: true,
imports: [SharedModule],
imports: [SharedModule, AuxToolWidget, EmptyWidget],
template: `
<div class="{{ prefix }}">
<ng-content></ng-content>
<app-aux-tool-widget></app-aux-tool-widget>
<app-empty-widget></app-empty-widget>
</div>
`,
styleUrls: ['../styles/styles.less'],
Expand Down
Loading

0 comments on commit a80ae88

Please sign in to comment.