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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
| import { NzMessageService } from 'ng-zorro-antd';
| import { Component } from '@angular/core';
| import { _HttpClient } from '@delon/theme';
|
| @Component({
| selector: 'app-widgets',
| templateUrl: './widgets.component.html',
| styleUrls: ['./widgets.component.less'],
| })
| export class WidgetsComponent {
| data = [];
| smallData = [];
|
| todoData: any[] = [
| {
| completed: true,
| avatar: '1',
| name: '苏先生',
| content: `请告诉我,我应该说点什么好?`,
| },
| {
| completed: false,
| avatar: '2',
| name: 'はなさき',
| content: `ハルカソラトキヘダツヒカリ`,
| },
| {
| completed: false,
| avatar: '3',
| name: 'cipchk',
| content: `this world was never meant for one as beautiful as you.`,
| },
| {
| completed: false,
| avatar: '4',
| name: 'Kent',
| content: `my heart is beating with hers`,
| },
| {
| completed: false,
| avatar: '5',
| name: 'Are you',
| content: `They always said that I love beautiful girl than my friends`,
| },
| {
| completed: false,
| avatar: '6',
| name: 'Forever',
| content: `Walking through green fields ,sunshine in my eyes.`,
| },
| ];
|
| like = false;
|
| dislike = false;
|
| constructor(public msg: NzMessageService, private http: _HttpClient) {
| this.http.get('/chart/visit').subscribe((res: any[]) => {
| this.data = res;
| this.smallData = res.slice(0, 6);
| });
| }
| }
|
|