person.page.ts 1.2 KB

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