添加登录流程、会话路由和对齐参考 UI 的主 Tab 框架
This commit is contained in:
21
suixinkan/UI/MainTab/MainTabBadgeViewModel.swift
Normal file
21
suixinkan/UI/MainTab/MainTabBadgeViewModel.swift
Normal file
@ -0,0 +1,21 @@
|
||||
//
|
||||
// MainTabBadgeViewModel.swift
|
||||
// suixinkan
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
/// 主 Tab 角标 ViewModel,负责订单 Tab 待核销数量。
|
||||
final class MainTabBadgeViewModel {
|
||||
|
||||
var onChange: (() -> Void)?
|
||||
|
||||
private(set) var pendingWriteOffCount: Int? {
|
||||
didSet { onChange?() }
|
||||
}
|
||||
|
||||
/// 刷新待核销数量;接口未接入前保持为空。
|
||||
func refreshPendingWriteOffCount() {
|
||||
pendingWriteOffCount = nil
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user