调整class文件,合并部分class到一个文件中
This commit is contained in:
@@ -4,8 +4,8 @@ import {ApiService} from '../../api/api.service';
|
||||
import {Article} from '../../class/Article';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
import {User} from '../../class/User';
|
||||
import {CommentReq} from '../../class/CommentReq';
|
||||
import {PageList} from '../../class/pageList';
|
||||
import {CommentReq} from '../../class/Comment';
|
||||
import {PageList} from '../../class/HttpReqAndResp';
|
||||
import {Comment} from '../../class/Comment';
|
||||
|
||||
declare var editormd;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {ApiService} from '../../api/api.service';
|
||||
import {Category} from '../../class/Category';
|
||||
import {Tag} from '../../class/Tag';
|
||||
import {NzMessageService} from 'ng-zorro-antd';
|
||||
import {PageList} from '../../class/pageList';
|
||||
import {PageList} from '../../class/HttpReqAndResp';
|
||||
import {Article} from '../../class/Article';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {Location} from '@angular/common';
|
||||
@@ -22,8 +22,8 @@ export class CategoryComponent implements OnInit {
|
||||
private title: Title) {
|
||||
}
|
||||
|
||||
categoryList: Category[] = [];
|
||||
private category: Category;
|
||||
categoryList: Tag[] = [];
|
||||
private category: Tag;
|
||||
articleList: PageList<Article>;
|
||||
|
||||
name: string;
|
||||
@@ -58,7 +58,7 @@ export class CategoryComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
changeCategory(category: Category) {
|
||||
changeCategory(category: Tag) {
|
||||
if (this.name === category.name) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@ import {ApiService} from '../../api/api.service';
|
||||
import {Article} from '../../class/Article';
|
||||
import {NzIconService, NzMessageService} from 'ng-zorro-antd';
|
||||
import {SvgIconUtil} from '../../utils/svgIconUtil';
|
||||
import {PageList} from '../../class/pageList';
|
||||
import {PageList} from '../../class/HttpReqAndResp';
|
||||
import {ErrDispatch} from '../../class/ErrDispatch';
|
||||
import {RequestObj} from '../../class/Request';
|
||||
import {RequestObj} from '../../class/HttpReqAndResp';
|
||||
import {Router} from '@angular/router';
|
||||
import {Category} from '../../class/Category';
|
||||
import {Tag} from '../../class/Tag';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
|
||||
@Component({
|
||||
@@ -36,7 +36,7 @@ export class IndexComponent implements OnInit, ErrDispatch {
|
||||
desc: string;
|
||||
articles: PageList<Article>;
|
||||
tagNameAndNumber: { name: string, size: number }[];
|
||||
categoryList: Category[];
|
||||
categoryList: Tag[];
|
||||
counts: {
|
||||
articleCount: number,
|
||||
visitorCount: number,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
||||
import {NzMessageService} from 'ng-zorro-antd';
|
||||
import {ApiService} from '../../../../api/api.service';
|
||||
import {LoginReq} from '../../../../class/LoginReq';
|
||||
import {LocalStorageService} from '../../../../utils/local-storage.service';
|
||||
import {LoginReq} from '../../../../class/User';
|
||||
import {LocalStorageService} from '../../../../services/local-storage.service';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {LoginRegistrationService} from '../../service/login-registration.service';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
|
||||
@@ -4,8 +4,8 @@ import {ApiService} from '../../../../api/api.service';
|
||||
import {NzMessageService} from 'ng-zorro-antd';
|
||||
import {Router} from '@angular/router';
|
||||
import {ErrDispatch} from '../../../../class/ErrDispatch';
|
||||
import {RequestObj} from '../../../../class/Request';
|
||||
import {LoginReq} from '../../../../class/LoginReq';
|
||||
import {RequestObj} from '../../../../class/HttpReqAndResp';
|
||||
import {LoginReq} from '../../../../class/User';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {Category} from '../../class/Category';
|
||||
import {PageList} from '../../class/pageList';
|
||||
import {PageList} from '../../class/HttpReqAndResp';
|
||||
import {Article} from '../../class/Article';
|
||||
import {Tag} from '../../class/Tag';
|
||||
import {ApiService} from '../../api/api.service';
|
||||
import {NzMessageService} from 'ng-zorro-antd';
|
||||
import {Location} from '@angular/common';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
|
||||
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
|
||||
import {ApiService} from '../../../../api/api.service';
|
||||
import {Category} from '../../../../class/Category';
|
||||
import {Tag} from '../../../../class/Tag';
|
||||
|
||||
@Component({
|
||||
selector: 'c-publish-form',
|
||||
@@ -16,7 +15,7 @@ export class PublishFormComponent implements OnInit {
|
||||
@ViewChild('inputElement', {static: false}) tagInputElement: ElementRef;
|
||||
|
||||
@Input() tagNacList: { name: string, size: number }[];
|
||||
@Input() categoryList: Category[];
|
||||
@Input() categoryList: Tag[];
|
||||
@Input() primaryData: { id: number, type: boolean, tags: string, category: string, url?: string };
|
||||
@Output() submitEvent = new EventEmitter<{ id: number, type: boolean, tags: string, category: string, url?: string }>();
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
|
||||
import {ArticleReq} from '../../class/ArticleReq';
|
||||
import {ArticleReq} from '../../class/Article';
|
||||
import {EditorConfig} from '../../class/EditorConfig';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {ApiService} from '../../api/api.service';
|
||||
import {NzMessageService} from 'ng-zorro-antd';
|
||||
import {User} from '../../class/User';
|
||||
import {Category} from '../../class/Category';
|
||||
import {Tag} from '../../class/Tag';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
|
||||
@Component({
|
||||
@@ -31,7 +31,7 @@ export class WriteComponent implements OnInit {
|
||||
public article: ArticleReq = new ArticleReq();
|
||||
|
||||
userInfo: User;
|
||||
categoryList: Category[];
|
||||
categoryList: Tag[];
|
||||
tagNacList: { name: string, size: number }[];
|
||||
primaryData = {};
|
||||
// 发布新文章时,文章相同会被拦回 此处判断一下
|
||||
|
||||
Reference in New Issue
Block a user