import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';

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

  /**
   * 输入标题
   */
  @Input() title:string;

  public _messages:Array<any> =[];

  /**
   * 输入属性
   */
  @Input() set messages(val:any){
    if(val){
      this._messages = JSON.parse(JSON.stringify(val));
    }
  }

  /**
    * 抛出数据
    */
  @Output() menuClick: EventEmitter<any> = new EventEmitter<any>();

  constructor() { }

  ngOnInit() { }

  handleClick(item: any) {
    this.menuClick.emit(item);
  }

}
