person.page.ts 1020 B

1234567891011121314151617181920212223242526272829303132
  1. import { Component } from '@angular/core';
  2. import { NavController } from '@ionic/angular';
  3. import { IonButton, IonButtons, IonHeader, IonToolbar, IonIcon, IonTitle, IonContent, IonCard, IonCardHeader, IonCardTitle, IonCardContent, IonItem, IonList } from '@ionic/angular/standalone';
  4. @Component({
  5. selector: 'app-person',
  6. templateUrl: 'person.page.html',
  7. styleUrls: ['person.page.scss'],
  8. standalone: true,
  9. imports: [IonHeader, IonToolbar, IonButtons, IonButton, IonIcon, IonTitle,
  10. IonContent, IonCard, IonCardHeader, IonCardTitle, IonCardContent, IonItem, IonList
  11. ]
  12. })
  13. export class PersonPage {
  14. constructor(private navCtrl: NavController) {}
  15. gender: string = '女'; // 默认性别
  16. signature: string = ''; // 个性签名
  17. goBack() {
  18. this.navCtrl.back();
  19. }
  20. navigateToTab4() {
  21. this.navCtrl.navigateForward('/tab4'); // 跳转到tab4
  22. }
  23. onInputChange(event: Event) {
  24. const input = event.target as HTMLInputElement;
  25. this.signature = input.value; // 更新个性签名
  26. }
  27. }