|
|
@@ -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
|