import {Component, HostListener} from '@angular/core';
import {NzMessageService} from "ng-zorro-antd/message";



@Component({
  selector: 'app-suit-companies-comp',
  templateUrl: './suit-companies-comp.component.html',
  styleUrls: ['./suit-companies-comp.component.scss']
})


export class SuitCompaniesCompComponent {

  constructor(public msg: NzMessageService) {
  }

  array = [1, 2, 3, 4];
  images: string[] = [
    "assets/images/suit-company-comp/1.png",
    "assets/images/suit-company-comp/1.png",
    "assets/images/suit-company-comp/1.png",
    "assets/images/suit-company-comp/1.png",
  ]


  //动态调整页面布局
  isMobileLayout = false;

  @HostListener('window:resize', ['$event'])
  onWindowResize(event: any) {
    this.checkLayout();
  }

  checkLayout() {
    this.isMobileLayout = window.innerWidth < 768; // 根据需要调整阈值
  }

  cards: { text: string }[] = [
    {text: 'Card 1 Text'},
    {text: 'Card 2 Text'},
    {text: 'Card 3 Text'},
    {text: 'Card 1 Text'},
    {text: 'Card 2 Text'},
    {text: 'Card 3 Text'},
    {text: 'Card 1 Text'},
    {text: 'Card 2 Text'},
    {text: 'Card 3 Text'},
    {text: 'Card 1 Text'},
    {text: 'Card 2 Text'},
    {text: 'Card 3 Text'},
    {text: 'Card 1 Text'},
    {text: 'Card 2 Text'},
    {text: 'Card 3 Text'},
    {text: 'Card 1 Text'},
    {text: 'Card 2 Text'},
    {text: 'Card 3 Text'},
    {text: 'Card 1 Text'},
    {text: 'Card 2 Text'},
    {text: 'Card 3 Text'},
    {text: 'Card 1 Text'},
    {text: 'Card 2 Text'},
    {text: 'Card 3 Text'},
    {text: 'Card 1 Text'},
    {text: 'Card 2 Text'},
    {text: 'Card 3 Text'},
    {text: 'Card 1 Text'},
    {text: 'Card 2 Text'},
    {text: 'Card 3 Text'},
    {text: 'Card 1 Text'},
    {text: 'Card 2 Text'},
    {text: 'Card 3 Text'},
    {text: 'Card 1 Text'},
    {text: 'Card 2 Text'},
    {text: 'Card 3 Text'},
  ];


}
