0225263 4 月之前
父節點
當前提交
81925f361a
共有 3 個文件被更改,包括 11 次插入4 次删除
  1. 2 2
      src/app/tab4/tab4.page.html
  2. 3 0
      src/app/tab4/tab4.page.scss
  3. 6 2
      src/app/tab4/tab4.page.ts

+ 2 - 2
src/app/tab4/tab4.page.html

@@ -69,14 +69,14 @@
     </ion-card-content>
   </ion-card>
   
-  <ion-card>
+  
     <ion-card-content style="justify-content: space-around">
       <p (click)="showContent('发布')">发布</p>
       <p (click)="showContent('收藏')">收藏</p>
       <p (click)="showContent('点赞')">点赞</p>
       <p (click)="showContent('浏览')">浏览</p>
     </ion-card-content>
-  </ion-card>
+  
 
   <div class="content-area">
     {{ selectedContent }}

+ 3 - 0
src/app/tab4/tab4.page.scss

@@ -34,4 +34,7 @@ ion-segment {
 
 p {
   font-size: 20px; /* 设置文字大小为20px */
+}
+p:active {
+  color: blue; /* 点击后文本颜色变为蓝色 */
 }

+ 6 - 2
src/app/tab4/tab4.page.ts

@@ -8,11 +8,15 @@ import { NavController } from '@ionic/angular';
 })
 export class Tab4Page implements OnInit {
 
-  constructor(private navCtrl: NavController) {}
+  constructor(private navCtrl: NavController) {this.selectedContent = '发布';}
   selectedContent: string = '';
 
   showContent(content: string) {
-    this.selectedContent = content;
+    if (content === '收藏') {
+      this.selectedContent = '一个作品都没有';
+    } else {
+      this.selectedContent = content;
+    }
   }
 
   openFeedbackPage() {