合并为一个项目 #14

Merged
xiaohai2271 merged 56 commits from issue11 into master 2020-05-16 22:35:08 +08:00
6 changed files with 23 additions and 8 deletions
Showing only changes of commit 441b5c9d10 - Show all commits

View File

@@ -18,8 +18,13 @@
nz-tooltip>{{data.title}}</td>
<td>{{data.publishDateFormat}}</td>
<td>{{data.updateDateFormat}}</td>
<td>{{data.original ? '原创' : '转载'}}</td>
<td>{{data.readingNumber}}</td>
<td>
<nz-tag nzColor="green" *ngIf="data.original">原创</nz-tag>
<nz-tag nzColor="#ff5500" *ngIf="!data.original">转载</nz-tag>
</td>
<td>
<nz-tag [nzColor]="'purple'">{{data.readingNumber}}</nz-tag>
</td>
<td><input type="checkbox" [checked]="data.open" disabled></td>
<td>
<a routerLink="/write" [queryParams]="{id:data.id}" class="edit-opr">编辑</a>

View File

@@ -3,6 +3,7 @@ import {NzMessageService} from 'ng-zorro-antd';
import {ApiService} from '../../../api/api.service';
import {PageList} from '../../../class/HttpReqAndResp';
import {Article} from '../../../class/Article';
import {Title} from '@angular/platform-browser';
@Component({
selector: 'app-admin-article',
@@ -11,7 +12,7 @@ import {Article} from '../../../class/Article';
})
export class AdminArticleComponent implements OnInit {
constructor(private apiService: ApiService, private nzMessage: NzMessageService) {
constructor(private apiService: ApiService, private nzMessage: NzMessageService, private title: Title) {
}
page: number = 1;
@@ -22,6 +23,7 @@ export class AdminArticleComponent implements OnInit {
loading: boolean = true;
ngOnInit(): void {
this.title.setTitle('小海博客 | 文章管理')
this.getArticle();
}

View File

@@ -6,7 +6,7 @@ import {
NzCardModule,
NzDividerModule,
NzPopconfirmModule,
NzTableModule,
NzTableModule, NzTagModule,
NzToolTipModule,
NzTypographyModule
} from 'ng-zorro-antd';
@@ -24,6 +24,7 @@ import {
NzCardModule,
NzDividerModule,
NzPopconfirmModule,
NzTagModule,
]
})
export class AdminArticleModule {

View File

@@ -34,7 +34,9 @@
<button nz-button (click)="editInfo.editFocus=false" nzSize="small">取消</button>
</nz-input-group>
</td>
<td>{{data.articles ? data.articles.length : 0}}</td>
<td>
<nz-tag [nzColor]="'purple'">{{data.articles ? data.articles.length : 0}}</nz-tag>
</td>
<td>
<a (click)="editFocus(data)" class="edit-opr">编辑</a>
<nz-divider nzType="vertical"></nz-divider>
@@ -69,7 +71,9 @@
<button nz-button (click)="editInfo.editFocus=false" nzSize="small">取消</button>
</nz-input-group>
</td>
<td>{{data.articles ? data.articles.length : 0}}</td>
<td>
<nz-tag [nzColor]="'purple'">{{data.articles ? data.articles.length : 0}}</nz-tag>
</td>
<td>
<a (click)="editFocus(data)" class="edit-opr">编辑</a>
<nz-divider nzType="vertical"></nz-divider>

View File

@@ -3,6 +3,7 @@ import {NzMessageService} from 'ng-zorro-antd';
import {Category, Tag} from '../../../class/Tag';
import {ApiService} from '../../../api/api.service';
import {PageList} from '../../../class/HttpReqAndResp';
import {Title} from '@angular/platform-browser';
@Component({
selector: 'app-admin-tag',
@@ -11,7 +12,7 @@ import {PageList} from '../../../class/HttpReqAndResp';
})
export class AdminTagComponent implements OnInit {
constructor(private apiService: ApiService, private nzMessageService: NzMessageService) {
constructor(private apiService: ApiService, private nzMessageService: NzMessageService, private title: Title) {
}
loading: boolean = true;
@@ -30,6 +31,7 @@ export class AdminTagComponent implements OnInit {
ngOnInit(): void {
this.title.setTitle('小海博客 | 标签分类管理')
this.getCategory();
this.getTag();
}

View File

@@ -7,7 +7,7 @@ import {
NzCardModule,
NzDividerModule, NzIconModule,
NzInputModule, NzPopconfirmModule,
NzTableModule, NzTabsModule,
NzTableModule, NzTabsModule, NzTagModule,
} from 'ng-zorro-antd';
import {FormsModule} from '@angular/forms';
@@ -28,6 +28,7 @@ import {FormsModule} from '@angular/forms';
NzPopconfirmModule,
NzButtonModule,
NzIconModule,
NzTagModule,
]
})
export class AdminTagModule {