Explorar el Código

fix: 修复部分位置的 UI 和文案

YuJing hace 1 mes
padre
commit
e132cc4193

+ 4 - 4
features/feature/src/main/ets/pages/IncreaseStudentPage.ets

@@ -116,13 +116,13 @@ struct IncreaseStudentPage {
   genderEnum(){
     Column() {
       Row({space:34}){
-        Text('男')
+        Text('男')
         Radio({group: 'sex', value: '男'})
           .checked(this.vm.gender == '男')
           .onChange(() => { this.vm._onGenderChange('男') })
       }
       .padding({ top: 10, bottom: 10})
-      .onClick(() => { this.vm._onGenderChange('男') })
+      .onClick(() => { this.vm._onGenderChange('男') })
 
       Divider()
         .height(1.5)
@@ -130,10 +130,10 @@ struct IncreaseStudentPage {
         .backgroundColor('#F6F6F6')
 
       Row({space:34}){
-        Text('女')
+        Text('女')
         Radio({group: 'sex', value: '女'})
           .checked(this.vm.gender == '女')
-          .onChange(() => { this.vm._onGenderChange('女') })
+          .onChange(() => { this.vm._onGenderChange('女') })
       }
       .padding({ top: 10, bottom: 10})
       .onClick(() => { this.vm._onGenderChange('女') })

+ 0 - 4
features/feature/src/main/ets/view/FourView.ets

@@ -33,10 +33,6 @@ export struct FourView {
                   Text(item)
                     .fontSize(20)
                     .fontWeight(500)
-
-                  Text('2025.11.10-2025.9-19')
-                    .fontSize(14)
-                    .fontColor('#666666')
                 }
                 .width("97%")
                 .borderRadius(15)

+ 1 - 1
features/feature/src/main/ets/view/MainView.ets

@@ -39,7 +39,7 @@ export struct MainView {
       // 学生列表
       Column(){
         EmptyComp({
-          isEmpty: this.vm.studentList.length == 0
+          isEmpty: this.vm.isEmpty
         }){
           List({space: 16}){
             ForEach(this.vm.studentList, (item: number, index) => {

+ 12 - 1
features/feature/src/main/ets/viewModel/MainViewModel.ets

@@ -5,11 +5,12 @@ import { iRouter } from "../utils/RouterUtils"
 export class MainViewModel{
   @Trace safeTop: number = 0
   // 学生列表
-  @Trace studentList: number[] = [ 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 2, 3 ]
+  @Trace studentList: number[] = []
   // 男生数量
   @Trace boyNum: number = 10
   // 女生数量
   @Trace girlNum: number = 10
+  @Trace isEmpty: boolean = true
 
   // 线性渐变
   linear: LinearGradientOptions = {
@@ -18,6 +19,8 @@ export class MainViewModel{
 
   constructor() {
     this.safeTop = AppStorage.get(YTAvoid.SAFE_TOP_KEY) as number
+
+    this._getStudentList()
   }
 
 
@@ -52,6 +55,14 @@ export class MainViewModel{
     })
   }
 
+  // 获取学生列表数据
+  async _getStudentList() {
+    // setTimeout(()=> {
+      this.studentList = [ 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 2, 3 ]
+    // }, 2000)
+  }
+
+
   /**
    * 重写的返回逻辑
    * @returns