21 changed files with 171 additions and 33 deletions
@ -1 +1,10 @@
|
||||
<p>basic-info works!</p> |
||||
<div class="box"> |
||||
<div class="nav"> |
||||
<ul> |
||||
<li [routerLink]="['/basicInfo/unit']" routerLinkActive="router-link-active">基本信息</li> |
||||
</ul> |
||||
</div> |
||||
<div class="content"> |
||||
<router-outlet></router-outlet> |
||||
</div> |
||||
</div> |
@ -0,0 +1,36 @@
|
||||
.box { |
||||
display: flex; |
||||
} |
||||
|
||||
|
||||
.nav { |
||||
width: 200px; |
||||
height: 100%; |
||||
background: #2c4dc1; |
||||
|
||||
ul { |
||||
li { |
||||
height: 48px; |
||||
line-height: 48px; |
||||
cursor: pointer; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.router-link-active { |
||||
background: #fff; |
||||
} |
||||
|
||||
.content { |
||||
flex: 1; |
||||
} |
||||
|
||||
.router-link-active { |
||||
color: black; |
||||
} |
||||
|
||||
.content { |
||||
box-sizing: border-box; |
||||
padding: 8px; |
||||
background: #F6F5F8; |
||||
} |
@ -0,0 +1 @@
|
||||
<button (click)="back()">返回</button> |
@ -0,0 +1,17 @@
|
||||
import { Component, OnInit } from '@angular/core'; |
||||
import { CustomReuseStrategy } from 'src/app/CustomReuseStrategy'; |
||||
@Component({ |
||||
selector: 'app-unit-details', |
||||
templateUrl: './unit-details.component.html', |
||||
styleUrls: ['./unit-details.component.scss'] |
||||
}) |
||||
export class UnitDetailsComponent implements OnInit { |
||||
|
||||
constructor() { } |
||||
|
||||
ngOnInit(): void { |
||||
} |
||||
back() { |
||||
window.history.back() |
||||
} |
||||
} |
@ -0,0 +1,2 @@
|
||||
<button (click)="next()">下一页</button> |
||||
<input placeholder="label" value="value"> |
@ -0,0 +1,6 @@
|
||||
p{ |
||||
color: black; |
||||
} |
||||
input{ |
||||
color: red; |
||||
} |
@ -0,0 +1,22 @@
|
||||
import { Component, OnInit } from '@angular/core'; |
||||
import { Router } from '@angular/router'; |
||||
|
||||
@Component({ |
||||
selector: 'app-unit', |
||||
templateUrl: './unit.component.html', |
||||
styleUrls: ['./unit.component.scss'] |
||||
}) |
||||
export class UnitComponent implements OnInit { |
||||
|
||||
constructor(private router: Router) { } |
||||
|
||||
ngOnInit(): void { |
||||
} |
||||
next() { |
||||
this.router.navigate(['/basicInfo/unit/details']); |
||||
} |
||||
ngOnDestroy(): void { |
||||
console.log('删除了6666666666666') |
||||
// CustomReuseStrategy.deleteRouteSnapshot('/basicInfo/unit');
|
||||
} |
||||
} |
Loading…
Reference in new issue