0225263 4 months ago
parent
commit
1176ab005f
3 changed files with 87 additions and 21 deletions
  1. 62 18
      src/app/tab4/tab4.page.html
  2. 19 3
      src/app/tab4/tab4.page.scss
  3. 6 0
      src/app/tab4/tab4.page.ts

+ 62 - 18
src/app/tab4/tab4.page.html

@@ -4,37 +4,81 @@
     <ion-buttons slot="end">
       <ion-button (click)="openFeedbackPage()">
         <ion-icon name="chatbubble-ellipses-outline"></ion-icon>
+        <ion-label>反馈</ion-label>
       </ion-button>
+      
       <ion-button (click)="openSettingsPage()">
         <ion-icon name="settings-outline"></ion-icon>
+        <ion-label>设置</ion-label>
       </ion-button>
     </ion-buttons>
   </ion-toolbar>
 </ion-header>
 
+
 <ion-content>
-  <ion-card>
     <ion-card-content>
-      <ion-avatar>
+      <ion-avatar style="margin-left:15px;margin-top:15px; transform:scale(1.5)">
         <img src="https://ionicframework.com/docs/img/demos/avatar.svg" alt="User Avatar">
       </ion-avatar>
-      <ion-label>登录/注册</ion-label>
+      <ion-label style="margin-left:15px;margin-top:15px;font-size:20px">登录/注册</ion-label>
     </ion-card-content>
-  </ion-card>
-  <ion-segment scrollable>
-    <ion-segment-button value="followings">关注的人</ion-segment-button>
-    <ion-segment-button value="creators">创作者中心</ion-segment-button>
-    <ion-segment-button value="ai">AI焕新家</ion-segment-button>
-    <ion-segment-button value="diagnosis">户型诊断</ion-segment-button>
-    <ion-segment-button value="circles">我的圈子</ion-segment-button>
-    <ion-segment-button value="my-followings">我的关注</ion-segment-button>
-    <ion-segment-button value="my-orders">我的订单</ion-segment-button>
-    <ion-segment-button value="decor-assistant">装修助手</ion-segment-button>
-    <ion-segment-button value="apply-verification">申请认证</ion-segment-button>
+      
+    
+
+  <ion-card>
+    <ion-card-content>
+    <ion-segment scrollable>
+    <ion-segment-button value="followings">
+      <ion-icon name="people-outline"></ion-icon>
+      关注的人
+    </ion-segment-button>
+    <ion-segment-button value="creators">
+      <ion-icon name="brush-outline"></ion-icon>
+      创作者中心
+    </ion-segment-button>
+    <ion-segment-button value="ai">
+      <ion-icon name="color-wand-outline"></ion-icon>
+      AI焕新家
+    </ion-segment-button>
+    <ion-segment-button value="diagnosis">
+      <ion-icon name="map-outline"></ion-icon>
+      户型诊断
+    </ion-segment-button>
+    <ion-segment-button value="circles">
+      <ion-icon name="chatbubbles-outline"></ion-icon>
+      我的圈子
+    </ion-segment-button>
+    <ion-segment-button value="my-followings">
+      <ion-icon name="heart-outline"></ion-icon>
+      我的关注
+    </ion-segment-button>
+    <ion-segment-button value="my-orders">
+      <ion-icon name="receipt-outline"></ion-icon>
+      我的订单
+    </ion-segment-button>
+    <ion-segment-button value="decor-assistant">
+      <ion-icon name="hammer-outline"></ion-icon>
+      装修助手
+    </ion-segment-button>
+    <ion-segment-button value="apply-verification">
+      <ion-icon name="shield-checkmark-outline"></ion-icon>
+      申请认证
+    </ion-segment-button>
   </ion-segment>
+    </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>
 
-  <ion-button>发布</ion-button>
-  <ion-button>收藏</ion-button>
-  <ion-button>点赞</ion-button>
-  <ion-button>浏览</ion-button>
+  <div class="content-area">
+    {{ selectedContent }}
+  </div>
 </ion-content>

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

@@ -1,7 +1,8 @@
 ion-card {
     margin: 10px;
+    top:8px;
   }
-  
+
   ion-card-content {
     display: flex;
     align-items: center;
@@ -16,6 +17,21 @@ ion-card {
   }
   
   ion-button {
-    margin: 5px;
+    margin: 15px;
   }
-  
+
+ion-segment-button {
+  font-size: 15px; /* 设置按钮字体大小为20px,让按钮整体看起来更大 */
+  padding: 5px 20px; /* 设置按钮内边距,增加按钮的大小 */
+}
+ion-segment {
+  --padding-start: 0; /* 设置起始内边距为0,让按钮靠左对齐 */
+  --padding-end: 0; /* 设置结束内边距为0,让按钮靠右对齐 */
+  overflow-x: auto; /* 水平滚动 */
+  scrollbar-width: none; /* 隐藏滚动条(适用于部分浏览器) */
+  
+}
+
+p {
+  font-size: 20px; /* 设置文字大小为20px */
+}

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

@@ -9,10 +9,16 @@ import { NavController } from '@ionic/angular';
 export class Tab4Page implements OnInit {
 
   constructor(private navCtrl: NavController) {}
+  selectedContent: string = '';
+
+  showContent(content: string) {
+    this.selectedContent = content;
+  }
 
   openFeedbackPage() {
     // 打开反馈页面
   }
+  
 
   openSettingsPage() {
     // 打开设置页面