import { Component } from '@angular/core';
import Parse from "parse";
@Component({
  selector: 'app-tab2',
  templateUrl: 'tab2.page.html',
  styleUrls: ['tab2.page.scss']
})
export class Tab2Page {
  showComment: boolean = false;
  newComment: string = '';

  constructor() {}

  toggleIconColor(event: any) {
    const icon = event.target;
    if (icon.getAttribute('color') === 'danger') {
      icon.setAttribute('color', 'primary');
    } else {
      icon.setAttribute('color', 'danger');
    }
  }
  showCommentArea(){
    console.log("showCommentArea")
    this.showComment=true
  }

  addComment() {
    // 添加评论的逻辑
  }
}

