|
@@ -1,11 +1,10 @@
|
|
|
import { Component } from '@angular/core';
|
|
|
-import { IonHeader, IonToolbar, IonTitle, IonContent, IonTabButton } from '@ionic/angular/standalone';
|
|
|
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonTabButton, IonSearchbar, IonLabel, IonItem, IonList } from '@ionic/angular/standalone';
|
|
|
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
|
|
|
import { IonButton } from '@ionic/angular/standalone';
|
|
|
import { IonIcon } from '@ionic/angular/standalone';
|
|
|
-import { EditTagComponent } from '../component/edit-tag/edit-tag.component';
|
|
|
-import { EditRatingStarComponent } from '../component/edit-rating-star/edit-rating-star.component';
|
|
|
import { Router } from '@angular/router';
|
|
|
+import { CommonModule } from '@angular/common';
|
|
|
|
|
|
|
|
|
@Component({
|
|
@@ -15,17 +14,45 @@ import { Router } from '@angular/router';
|
|
|
standalone: true,
|
|
|
imports: [
|
|
|
IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent, IonTabButton, IonButton,
|
|
|
- IonIcon,
|
|
|
+ IonIcon,IonSearchbar,IonLabel,IonItem,IonList,CommonModule
|
|
|
],
|
|
|
})
|
|
|
export class Tab1Page {
|
|
|
|
|
|
+
|
|
|
+
|
|
|
constructor(private router: Router) {}
|
|
|
|
|
|
/**
|
|
|
- * Go to the page-test page
|
|
|
+ * Go to the ai page
|
|
|
+ */
|
|
|
+ goToPage1(){
|
|
|
+ this.router.navigate(['/tabs/page-test'])
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Go to the human page
|
|
|
*/
|
|
|
- goToPage(){
|
|
|
+ goToPage2(){
|
|
|
this.router.navigate(['/tabs/page-test'])
|
|
|
}
|
|
|
+
|
|
|
+ searchContent:string = ''; //搜索内容
|
|
|
+
|
|
|
+ handleInput(ev:any) {
|
|
|
+ console.log("ev.detail.value: ",ev.detail.value)
|
|
|
+ this.searchContent = ev.detail.value;
|
|
|
+ }
|
|
|
+
|
|
|
+ search(){
|
|
|
+ if (this.searchContent == ''){
|
|
|
+ console.log("请输入搜索内容")
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ console.log("搜索内容: ",this.searchContent)
|
|
|
+ this.searchContent = '';
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ ngOnInit() {}
|
|
|
}
|