tab2.page.ts 476 B

12345678910111213141516171819202122
  1. import { Component } from '@angular/core';
  2. @Component({
  3. selector: 'app-tab2',
  4. templateUrl: 'tab2.page.html',
  5. styleUrls: ['tab2.page.scss'],
  6. })
  7. export class Tab2Page {
  8. selectedTab = 'profile';
  9. items: any[] = [
  10. { image: 'assets/image1.jpg', likes: 100 },
  11. { image: 'assets/image2.jpg', likes: 150 },
  12. { image: 'assets/image4.jpg', likes: 120 },
  13. // 添加更多项目
  14. ];
  15. constructor() {}
  16. selectTab(tab: string) {
  17. this.selectedTab = tab;
  18. }
  19. }