fengxiang
2018-07-12 655edbc7405188c4bb32e63bf52a9a31ac00d75c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { Component, OnInit } from '@angular/core';
import { NzMessageService } from 'ng-zorro-antd';
import { getFakeList } from '../../../../../../_mock/api.service';
 
@Component({
    selector: 'pro-basic-list',
    templateUrl: './basic-list.component.html',
    styleUrls: [ './basic-list.component.less' ]
})
export class ProBasicListComponent implements OnInit {
    q: any = {
        status: 'all'
    };
    loading = false;
    data: any[] = [];
 
    constructor(public msg: NzMessageService) {}
 
    ngOnInit() {
        this.getData();
    }
 
    getData() {
        this.loading = true;
        setTimeout(() => {
            this.data = getFakeList(5);
            this.loading = false;
        }, 1000);
    }
}