|
@@ -1,57 +1,16 @@
|
|
-import { Component, ViewChild } from '@angular/core';
|
|
|
|
-import { IonicModule } from '@ionic/angular';
|
|
|
|
|
|
+import { Component } from '@angular/core';
|
|
|
|
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonSearchbar } from '@ionic/angular/standalone';
|
|
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
|
|
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
|
|
-import { IonAvatar, IonCard, IonCardContent, IonCardHeader, IonCol, IonContent, IonFab, IonFabButton, IonGrid, IonIcon, IonItem, IonLabel, IonList, IonRow, IonSearchbar, IonTab, IonTabBar, IonTabButton, IonTabs, IonThumbnail, IonToolbar } from '@ionic/angular/standalone';
|
|
|
|
-import { CommonModule } from '@angular/common'; // 导入 CommonModule 以使用 *ngFor
|
|
|
|
|
|
|
|
@Component({
|
|
@Component({
|
|
selector: 'app-tab1',
|
|
selector: 'app-tab1',
|
|
templateUrl: 'tab1.page.html',
|
|
templateUrl: 'tab1.page.html',
|
|
styleUrls: ['tab1.page.scss'],
|
|
styleUrls: ['tab1.page.scss'],
|
|
standalone: true,
|
|
standalone: true,
|
|
- imports: [
|
|
|
|
- IonicModule,
|
|
|
|
- IonContent, IonToolbar, IonGrid, IonRow, IonCard, IonCardContent, IonCardHeader,
|
|
|
|
- IonCol, IonTab, IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel, IonList, IonItem,
|
|
|
|
- IonThumbnail, IonAvatar, IonSearchbar, IonFab, IonFabButton,
|
|
|
|
- ExploreContainerComponent,
|
|
|
|
- CommonModule
|
|
|
|
- ]
|
|
|
|
|
|
+ imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent,IonSearchbar]
|
|
})
|
|
})
|
|
export class Tab1Page {
|
|
export class Tab1Page {
|
|
- constructor() {}
|
|
|
|
-
|
|
|
|
- @ViewChild('slides') ionSlides: any; // 使用 ViewChild 获取 ion-slides 实例
|
|
|
|
-
|
|
|
|
- slides: any[] = [
|
|
|
|
- { image: 'src/assets/img/1.png' },
|
|
|
|
- { image: 'src/assets/img/1.png' },
|
|
|
|
- { image: 'src/assets/img/1.png' },
|
|
|
|
- ];
|
|
|
|
-
|
|
|
|
- hotRecommendations: any[] = [
|
|
|
|
- { title: '滕王阁', description: '江南三大名楼之一', image: 'src/assets/img/1.png' },
|
|
|
|
- { title: '八一广场', description: '南昌市中心广场', image: 'src/assets/img/1.png' },
|
|
|
|
- // 更多推荐...
|
|
|
|
- ];
|
|
|
|
|
|
|
|
- events: any[] = [
|
|
|
|
- { title: '南昌国际马拉松', description: '一年一度的国际体育赛事', image: 'src/assets/img/1.png' },
|
|
|
|
- // 更多活动...
|
|
|
|
- ];
|
|
|
|
-
|
|
|
|
- personalizedRecommendations: any[] = [
|
|
|
|
- { title: '红色旅游线路', description: '南昌起义纪念馆一日游', image: 'src/assets/img/1.png' },
|
|
|
|
- // 更多个性化推荐...
|
|
|
|
- ];
|
|
|
|
-
|
|
|
|
- travelGuides: any[] = [
|
|
|
|
- { title: '一日游推荐', description: '南昌市区经典一日游路线', image: 'src/assets/img/1.png' },
|
|
|
|
- // 更多攻略...
|
|
|
|
- ];
|
|
|
|
|
|
+ constructor() {}
|
|
|
|
|
|
- travelPosts: any[] = [
|
|
|
|
- { username: '张三', content: '今天去了滕王阁,真的很壮观!', avatar: 'src/assets/img/1.png' },
|
|
|
|
- // 更多用户互动...
|
|
|
|
- ];
|
|
|
|
}
|
|
}
|