ThirdViewModel.ets 479 B

12345678910111213141516171819202122
  1. import { YTAvoid } from "basic";
  2. @ObservedV2
  3. export class ThirdViewModel{
  4. @Trace safeBottom = AppStorage.get(YTAvoid.SAFE_BOTTOM_KEY) as number;
  5. @Trace safeTop = AppStorage.get(YTAvoid.SAFE_TOP_KEY) as number;
  6. // 当前分类索引
  7. @Trace categoryIndex: number = 0
  8. // 编辑模式
  9. @Trace editMode: boolean = false
  10. // 分类
  11. categoryList = ['全部', '可借', '已借光', '已预订']
  12. changeCategory(index: number) {
  13. this.categoryIndex = index
  14. }
  15. }