Skip to content

Commit

Permalink
feat(列表页): 添加列表页模块,查询表格组件,标准列表组件,卡片列表组件,搜索列表(项目)组件等组件
Browse files Browse the repository at this point in the history
  • Loading branch information
jiayisheji committed Nov 7, 2017
1 parent e7cdb85 commit fbf5bce
Show file tree
Hide file tree
Showing 26 changed files with 324 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/pages/list/basic-list/basic-list.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
basic-list works!
</p>
Empty file.
25 changes: 25 additions & 0 deletions src/app/pages/list/basic-list/basic-list.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { BasicListComponent } from './basic-list.component';

describe('BasicListComponent', () => {
let component: BasicListComponent;
let fixture: ComponentFixture<BasicListComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BasicListComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(BasicListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/pages/list/basic-list/basic-list.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-basic-list',
templateUrl: './basic-list.component.html',
styleUrls: ['./basic-list.component.scss']
})
export class BasicListComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
3 changes: 3 additions & 0 deletions src/app/pages/list/card-list/card-list.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
card-list works!
</p>
Empty file.
25 changes: 25 additions & 0 deletions src/app/pages/list/card-list/card-list.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { CardListComponent } from './card-list.component';

describe('CardListComponent', () => {
let component: CardListComponent;
let fixture: ComponentFixture<CardListComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CardListComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(CardListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/pages/list/card-list/card-list.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-card-list',
templateUrl: './card-list.component.html',
styleUrls: ['./card-list.component.scss']
})
export class CardListComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
cover-card-list works!
</p>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { CoverCardListComponent } from './cover-card-list.component';

describe('CoverCardListComponent', () => {
let component: CoverCardListComponent;
let fixture: ComponentFixture<CoverCardListComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CoverCardListComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(CoverCardListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/pages/list/cover-card-list/cover-card-list.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-cover-card-list',
templateUrl: './cover-card-list.component.html',
styleUrls: ['./cover-card-list.component.scss']
})
export class CoverCardListComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
filter-card-list works!
</p>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { FilterCardListComponent } from './filter-card-list.component';

describe('FilterCardListComponent', () => {
let component: FilterCardListComponent;
let fixture: ComponentFixture<FilterCardListComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ FilterCardListComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(FilterCardListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/pages/list/filter-card-list/filter-card-list.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-filter-card-list',
templateUrl: './filter-card-list.component.html',
styleUrls: ['./filter-card-list.component.scss']
})
export class FilterCardListComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
47 changes: 47 additions & 0 deletions src/app/pages/list/list-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { TableListComponent } from './table-list/table-list.component';
import { BasicListComponent } from './basic-list/basic-list.component';
import { CardListComponent } from './card-list/card-list.component';
import { CoverCardListComponent } from './cover-card-list/cover-card-list.component';
import { FilterCardListComponent } from './filter-card-list/filter-card-list.component';
import { SearchComponent } from './search/search.component';

const routes: Routes = [
{
path: '',
redirectTo: '/list/table-list',
pathMatch: 'full'
},
{
path: 'table-list',
component: TableListComponent
},
{
path: 'basic-list',
component: BasicListComponent
},
{
path: 'card-list',
component: CardListComponent
},
{
path: 'cover-card-list',
component: CoverCardListComponent
},
{
path: 'filter-card-list',
component: FilterCardListComponent
},
{
path: 'search',
component: SearchComponent
},
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class ListRoutingModule { }
19 changes: 19 additions & 0 deletions src/app/pages/list/list.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { ListRoutingModule } from './list-routing.module';
import { TableListComponent } from './table-list/table-list.component';
import { BasicListComponent } from './basic-list/basic-list.component';
import { CardListComponent } from './card-list/card-list.component';
import { CoverCardListComponent } from './cover-card-list/cover-card-list.component';
import { FilterCardListComponent } from './filter-card-list/filter-card-list.component';
import { SearchComponent } from './search/search.component';

@NgModule({
imports: [
CommonModule,
ListRoutingModule
],
declarations: [TableListComponent, BasicListComponent, CardListComponent, CoverCardListComponent, FilterCardListComponent, SearchComponent]
})
export class ListModule { }
3 changes: 3 additions & 0 deletions src/app/pages/list/search/search.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
search works!
</p>
Empty file.
25 changes: 25 additions & 0 deletions src/app/pages/list/search/search.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { SearchComponent } from './search.component';

describe('SearchComponent', () => {
let component: SearchComponent;
let fixture: ComponentFixture<SearchComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SearchComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(SearchComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/pages/list/search/search.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-search',
templateUrl: './search.component.html',
styleUrls: ['./search.component.scss']
})
export class SearchComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
3 changes: 3 additions & 0 deletions src/app/pages/list/table-list/table-list.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
table-list works!
</p>
Empty file.
25 changes: 25 additions & 0 deletions src/app/pages/list/table-list/table-list.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { TableListComponent } from './table-list.component';

describe('TableListComponent', () => {
let component: TableListComponent;
let fixture: ComponentFixture<TableListComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TableListComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(TableListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/pages/list/table-list/table-list.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-table-list',
templateUrl: './table-list.component.html',
styleUrls: ['./table-list.component.scss']
})
export class TableListComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}

0 comments on commit fbf5bce

Please sign in to comment.