import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-view-change-demo', templateUrl: './view-change-demo.component.html', styleUrls: ['./view-change-demo.component.scss'] }) export class ViewChangeDemoComponent implements OnInit { toolbarIconData2 = [ { type: 'type11', url:'list-grid', title:'卡片视图', iconName:'k-icon k-i-calendar-date' }, { type: 'type22', url:'list-echart', title:'图表视图', iconName:'k-icon k-i-star-outline' }, { type: 'type33', url:'list-view', title:'列表视图', iconName:'k-icon k-i-columns', disable:'true' }, { type: 'type44', url:'list-card', title:'日历视图', iconName:'k-icon k-i-bookmark' } ] currentType2 = 'type11'; constructor() { } ngOnInit() { } toolTypeChange2(event){ this.currentType2 = event.type; } }