summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/components/details/details.component.ts
blob: f9e6474b50ec34753f6e8ef2c1ce62b9ebf2e46b (plain)
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
import { Component, OnInit, Input } from '@angular/core';
import { slideUpDown } from '../../animates';

@Component({
  selector: 'app-details',
  templateUrl: './details.component.html',
  styleUrls: ['./details.component.less'],
  animations: [ slideUpDown ]
})
export class DetailsComponent implements OnInit {

  constructor() { }

  ngOnInit() {
  }

  ngOnChanges(changes){
    console.log(changes);
  }
  // 详情显示
  moredetailShow = false;
  @Input() detailId;
  detailData = [
    {name:"DNS.AttDnsQuery",value:"0"},
    {name:"DNS.SuccDnsQuery",value:"0"},
    {name:"DNS.SuccDnsQuery",value:"0"},
    {name:"DNS.SuccDnsQuery",value:"0"},
    {name:"DNS.SuccDnsQuery",value:"0"},
    {name:"sssssss",value:"1111"},
  ]
  state = 'up'
  slideUpDown(){
    this.moredetailShow = !this.moredetailShow;
    this.state = this.state === 'up' ? 'down' : 'up';
  }
}